#craig-az_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1377770703490908161
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi
Hi there
So you're creating Subscriptions on Stripe Checkout and you want to know what event to use as a source of truth for provisioning service, is that right?
Yes
Do you use free trials or anything like that?
No, not at this time.
but if I do in the future, it would be nice to know how to handle that as well.
Mostly I think you would likely listen to the Subscription-specific events - customer.subscription.created and customer.subscription.updated and look at the status property on the Subscription. If you aren't doing free trials and are collecting payment up front, then if a Subscription is in a "paid" status, it means that you have a successful payment.
We have a guide on the topic here: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements#provision-access
Ok, I'll read that. To be clear, the video talked about CheckoutSessionCompleted This video was posted today: https://www.youtube.com/watch?v=P6HKIm7ksfI&ab_channel=StripeDevelopers
Learn how to enable subscription-based services within your .NET web applications using Stripe. This video covers setting up a subscription product in the Stripe dashboard, configuring a low-code pricing table for the website, and incorporating user authentication to link subscriptions with existing Stripe customer data.
Also learn how to hand...
๐ Taking over this thread, catching up now
Not sure why the video said what it did and you and your docs are saying different
Thanks for sharing the video. For subscription integration using Checkout Session, you can rely on checkout.session.completed event with paid status for the successful payment for the initial sign up: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=stripe-hosted#provision-and-monitor, which is the same as what video mentioned.
However, checkout.session.completed event is only for the first payment during the subscription sign up. For the recurring payments in the future cycle, invoice.paid event should be monitored: https://docs.stripe.com/billing/subscriptions/webhooks#active-subscriptions
In summary,
checkout.session.completedevent withpaidstatus for the first invoice/subscription paymentinvoice.paidandinvoice.payment_failedevents for the recurring payment status
I'd recommend checking this guide on how to use the subscription related webhook events here: https://docs.stripe.com/billing/subscriptions/webhooks#events
checkout.session.completed also causes invoice.paid to be generated. is there a tie in between the two so I can know to ignore that particular invoice.paid since I've already enabled the SaaS tenant because of checkout.session.completed ?