Basically I have a user subscribe to a plan, and he gets X number of credits. This credits must be replenished when his subscription gets renewed. How can I check if the user's account status from Stripe API and determine if his monthly subscription has been renewed, and if so, allow me to replenish his credit on my data base?
If he fails to renew, it should be that he does not get more credits.
What api features exists in Stripe to let me get the subscription status so that I can replenish a user's credits based on renewal date or cancellation?