how can i perform a function when a paid plan renews?

I am trying to run a function every time a paid plan (done with the app pricing plans) automatically renews.
I checked in the references but didn’t find much except this:
https://www.wix.com/velo/reference/wix-paid-plans-backend/events/onplanpurchased

Maybe this can work but I didn’t understand if it starts only when a plan is purchased or even every time it is renewed, can someone explain me how to do it?

The onPlanPurchased() event is only triggered on initial purchase - not on renew.

And how do I do this? I can maybe put a worker that checks everyone’s status every day but I would not be able to run it only once a month, are there other ways?

You might be able to use Recurring Jobs .

If you want, request a new event as a new feature. The Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.

Yes, but the recurring job should be performed every day to keep up with the deadlines of all the subscriptions but I need a certain value to be entered in a database only if that subscription is renewed, any ideas? I use recurring jobs to do a check every day but then I would have to use an if () and check if after the expiration date it is still valid but I believe that the date moves every time to the next month so the condition would never be satisfied , how can I do?

@bigimatt14 You could keep current status in a DB collection, and base the checking of the new status based on the stored status.

I would also like to run an event when someone’s Pricing Plan renews. For example, we want to send the client a discount code to use on apparel when their yearly club membership automatically renews.