Can I run custom code if wix store purchase was successful ?

Hi.

I am trying to run an external API after each purchase made by the customers on wix store.
Is this somehow possible? A triggered method when a purchase is made?

Thanks

I found out that there is a method that fires when an order is marked as paid on the wix-stores-backend → events → onOrderPaid( )
I guess this is what I need, thank you anyways.