#kosherslayer
1 messages · Page 1 of 1 (latest)
Hi there, you can check https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-payment_status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah but how can I distinguish then from a failed card payment (which would give me a payment status of unpaid) and an async payment?
I want to provision access on customer paid and async payments immediately, then only unprovision the async payment if it failed
ohh failed card payments dont trigger a checkout.session.completed event
So only instant successful payments and all async payments trigger checkout.session.completed?
If you want to get more details, you can listen to payment_intent.payment_failed for failed payments, and payment_intent.suceeded for succeeed payments.
can you answer this:
So only instant successful payments and all async payments trigger checkout.session.completed?
Not 100% true. For payment methods that can't be confirmed immediately (i.e., status=pending), you'll also get the checkout.session.completed
is that not an async payment tho?
I want to provision access on customer paid and async payments immediately, then only unprovision the async payment if it failed
I'll just provision access on all checkout.session.completed events and revoke it on async payment failed in invoice.payment_failed
that should handle it