#krupskis
1 messages · Page 1 of 1 (latest)
👋 happy to help
"evt_1Nug57Hu8ZrDGEH9YQQqDDdp" This is event id testing env, you can sees tatus is incomplete
actually the best practice here is to use the invoice.paid events
And this is the production event: "evt_1NuryRHu8ZrDGEH9tNwPZK3P", status is active immediately
this way you're sure that the Subscription's invoice is paid and you can provide your services to your customers
What about checkout.session.completed?
checkout session completed means that we've collected successfully the payment method, but that doesn't mean the payment happened
especially if the PM is an asynchronous PM type (e.g. Direct Debit, Bank transfer, BNPL)
I see, I was reluctant to use invoice.paid, as subscription events seemed to be more intuitive to manage subscriptions
you can take a look at all of the subscription related events here https://stripe.com/docs/billing/subscriptions/webhooks and read about our recommendation
Cheers
let me know if you need any more help
just fyi, the reason why the subscriptions worked differently is because the one created in livemode there was a 100% discount
meaning that the first invoice had a 0 amount
in these cases we automatically put the subscription in an active state
That makes a lot of sense, thanks for letting me know
yes sure
this is why we rely on invoice.paid because it always fires when the invoice is paid whether it is a trial or a 100% discount or an invoice > 0,
@storm estuary On invoice.paid can I rely that when I query the subscription the current_period_start and current_period_end will be there?
Since it is not included in the invoice.paid itself
yes you can retrieve the subscription from the subscription property on the invoice