Develop Websites
Build Apps
Go Headless
APIs and SDKs
/
onOrderCreated( )
Notes:
This method registers a callback function as an event handler.
When
developing websites
or
building apps with Blocks
, use a
Velo backend event
instead of this method.
The way you call this method differs depending on the framework you are working in:
When using the
CLI
, run the
generate
command to
add an event extension
, and then call this method within the extension code.
When building a
self-hosted app
,
subscribe your app to the relevant event
, and then call this method on your server.
Triggered when an order is created.
Permissions
Manage Orders
Manage plans and orders of Pricing Plans
Read Orders
Manage Events
Learn more about
app permissions
.
Method Declaration
Copy
Method Parameters
handler
function
handler(event: OrderCreatedEnvelope): void | Promise<void>
Show function Parameters
Did this help?
Yes
No