Update database after a member payed payment plan

Hello,

So I have created a payment plan and it’s set up and working.
I would like to update database/collection I have with all the information of the competitors we have in our organization. So I can adjust a field key display that they have an active license.

Recap
— user pays payment plan
— dataset gets an update (Specific field key, for example boolean).

https://www.wix.com/velo/reference/wix-pay-backend/events/onpaymentupdate
I think this is what i need, But how would I get the user id / owner ID. I require this to search the database and update.

So if someone can help me along, btw i know js and velo, but I’m curious how I can get this working (because I can’t test this system without paying)

Greetings

If you’re referring to pricing plans then the onOrderPurchased event has a property showing which user purchased the plan: event.data.order.buyer.memberId

https://www.wix.com/velo/reference/wix-pricing-plans-backend/events/onorderpurchased

1 Like