I'm using the Wix Paid Plans and I need to call an external API in order to automate the purchase process.
How do I do that ?
From what I understood, I need to catch an onPlanPurchased event and call a fetch function to to my POST.
Tried to add it in "events.js" in the Backend section.
Tried to add it to the site code and also to the "Plans & Pricing" page code.
Nothing seem to work.
Please advise on how to do it correctly.