Trigger events outside Wix

I need to trigger an event outside Wix every time a purchase is made in my Wix store. I need Wix to capture and send three things (1. customer name, 2. email, and 3. product purchased) and send that info to a different server (OUTSIDE WIX) to trigger further code.

I’m selling content that is viewed on a mobile app. Wix stores are not setup to sell that so I have digital products setup - but the real product is a code I generate on my server and send to customers.
I see the Wix APIs - and I see Wix automatons. But I don’t see how to fire a REST api endpoint whenever the user makes a purchase, with the needed info.

Any tips? Is this possible?

Hi Christian,

I am not an expert on Wix Stores, but I would investigate looking at a relatively new event that is fired when a new order is added. I believe it is called onNewOrder or something (ok, looked it up, it is called as such : https://www.wix.com/corvid/reference/wix-stores-backend.Events.html#onNewOrder. On that trigger, you could use Wix-fetch (http-post) to an endpoint of you liking. Now, this might be the C out of the CRUD, but, I hear you wonder, what about Update and Delete (the U and D)? That is something I really do not know, but I would look into db-hooks (AfterUpdate, AfterRemove) on the orders collection. Maybe they get fired when these actions happen, you will have to test.
Hope this helps a bit.