Code After Purchase Item (Wix Store)

Hello, I want to know is there any way to add code that works after member purchase item with wix store app?

For example, add 100(number value) on Sample Database when member purchase an Item. So member can stack the numbers every time they purchase like point.

If there is a other way without wix store, it will helpful too.

You could look at:
export async function wixStores_onOrderPaid(event) {}

You can find out more about that here: https://www.wix.com/velo/reference/wix-stores-backend/events/onorderpaid

This is a back-end “events.js” function that is exported and called when any order is marked as “Paid”. There is another called onNewOrder() that is called when the order is placed (but possibly before it is marked as paid).

There are some tutorials and Codecademy.com courses that talk you through how to work in the back-end with events.js. I’d recommend going through those before diving into this.

Thank you for your answer! This is helpful!