Question:
Export order data to external API on order creation
Product:
Wix Velo
What are you trying to achieve:
I want that, once any order is created, to be able to do an HTTP request to an external API, from the backend (because security).
What have you already tried:
I tried to hook to wixPricingPlans_onOrderCreated event in events.js backend file - but it’s not triggered. I’m not sure I understand how events.js content works.
If my function is:
export function wixPricingPlans_onOrderCreated(event) {
console.log(“called”);
}
then the event is automatically registered by Valo, just based on the name?
The idea is that I need to do this call in the easiest way possible, but currently I’m unable to hook to a correct backend event for order created.
Thank you guys!