#pato-subscription-data
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ezequielpato., 6 days ago, 22 messages
- ezequielpato., 6 days ago, 12 messages
@heavy notch let's chat here!
Ok
Hello!
I applied a code to make a subscription in stripe. It works correctly.
When the subscription is successful stripe redirects me to my website with a session id code as a query in my navigation bar
Well
Now. I need to check if the subscription is active any time a user enter into a course
I wrote a code for that
It works fine. but i'm using an Subscription ID
sub_1O7N9NIr6Uv0nOknVTd1dgfR to check it
Because I have access to the main control panel and i can see this code
But at what point does Stripe return this code to me when I subscribe? Stripe just show me the sessionId not the subscriptionId
Do you understand me ?
Sorry i speak Spanish not English
Doing that i can see de customer ID
I recommend using webhooks for this: https://stripe.com/docs/billing/subscriptions/webhooks
We'll send you an event when a new subscription is created. That event will include the full subscription object, including the ID
Great I will check the information!
What data do you recommend I store? So you can then compare them with the Stripe API return?
subID, customerID, email ?
You should store subscription ID and customer ID at a minimum, and likely the subscription status. You may also want to keep record of the price they've subscribed to as well as billing cycle information. Then, as needed, you can update your database whenever you receive customer.subscription.updated events in the future.
OK, thanks a lot! I will try with this new information