#craig-az_webhooks

1 messages ยท Page 1 of 1 (latest)

worthy ospreyBOT
#

๐Ÿ‘‹ 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.

hazy briar
#

Hi

vague sinew
#

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?

hazy briar
#

Yes

vague sinew
#

Do you use free trials or anything like that?

hazy briar
#

No, not at this time.

#

but if I do in the future, it would be nice to know how to handle that as well.

worthy ospreyBOT
vague sinew
hazy briar
#

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...

โ–ถ Play video
cerulean wagon
#

๐Ÿ‘‹ Taking over this thread, catching up now

hazy briar
#

Not sure why the video said what it did and you and your docs are saying different

cerulean wagon
#

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.completed event with paid status for the first invoice/subscription payment
  • invoice.paid and invoice.payment_failed events 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

Learn to use webhooks to receive notifications of subscription activity.

Create and manage subscriptions to accept recurring payments.

hazy briar
#

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 ?