#vipul
1 messages · Page 1 of 1 (latest)
Hello 👋
I am running recurring payment how do I know if its actually gets failed or not?
Not sure what you mean by that, can you elaborate?
I am using Stripe checkout session with 3ds card in test mode.
When Popup opens for authorization, it sends invoice.payment_failed event webhook before I confirm authorization. Your Support person said to use stripe_checkout_completed webhook instead of that
Should I use that?
Hello
Please be patient, there are other folks on this server who need help too
I did have previous thread and guy changed and I got generic answer after that
And it did close
Should I use that?
Should you use that for what? I'm sorry but the question is quite vague. What are you trying to implement exactly?
Hi,
I am using Stripe checkout session with 3ds card in test mode.
When Popup opens for authorization, it sends invoice.payment_failed event webhook before I confirm authorization.
Why is that?
That's expected, as Stripe tries to charge the payment method automatically but issuer requires 3DS authentication. So the first attempt to pay the invoice technically failed. invoice.payment_failed is expected in that case
Ok, So what webhook should I use to confirm payment then?
invoice.paid is the one folks typically rely on for payment confirmations
https://stripe.com/docs/billing/subscriptions/webhooks
If the checkout session is for an intial invoice then you can just rely on checkout.session.completed
True but checkout.session.completed gets called first time
My payment is subscription based, If I don't rely on invoice paid and invoice failed then for next payment I won't know what happened
I am suggesting that you rely on checkout.session.completed for first invoice and then invoice.paid for subsequent invoices
Each recurring invoice will have a billing_reason set to subscription_cycle
https://stripe.com/docs/api/invoices/object?lang=ruby#invoice_object-billing_reason
The first invoice will have billing_reason set to subscription_create
Ok That's what I am looking for a clear identifier
Yeah sorry, that wasn't super clear from your earlier questions. But glad you're unblocked
Thanks for the help
One more question
What is the best way to handle confirmation of payment and subscription started for 3ds and non 3DS cards?
I mean what webhooks should be used to handle both type of cards
As in what webhook should you listen to to see the first payment succeeding? invoice.paid is a good event for that, you can check the billing_reason on the Invoice to see if it is the first invoice or not