#lelouch
1 messages · Page 1 of 1 (latest)
Then checkout.session.completed is the important one to listen. More details in https://stripe.com/docs/payments/checkout/fulfill-orders#fulfill
hmm thanks
but what if a card got declined or payment from card is still pending ?
or some sort of error happened and stripe is still trying to get payment which would be considered as also pending or retrying, how do i know all this ?
oh i think i get it, i can just consider a payment to user as pending untill "checkout.session.completed" is called and if any sort of error happened stripe will give "checkout.session.async_payment_failed" ? is this correct ?
async_payment_failed is a bit of special event only fired by some payment method, not card. Let's put it aside
Yes you can consider a payment as pending until checkout.session.completed. If any error happens you would have payment_intent.failed instead
Normally business don't care about error, they only want to know checkout.session.completed
You can test all of this flow by using test mode and use a Stripe test card or test failed card
ah i see, so is it ok to listen for both "checkout.session.async_payment_failed" and "payment_intent.failed" ?
ah i need to know about the error cause i am creating a sort of wallet app
i see here the heckout.session.async_payment methods are being used
Yeah that's example but you know it's not for card:
This step is only required if you plan to use any of the following payment methods: Bacs Direct Debit, Boleto, Canadian pre-authorized debits, Konbini, OXXO, SEPA Direct Debit, SOFORT, or ACH Direct Debit.