#MarkoBoras

1 messages · Page 1 of 1 (latest)

dark charmBOT
left plover
#

What's the cs_xxx ID of the session?

true furnace
#

pi_3NVXIvGBNe6stkne07XVU6XL
cs_live_b1tF6jq2KgI5LsimSRh4N1M05uArE2ayjd4FgRRq23PDzprGSxCZPMbjY3

left plover
#

Was paid via SEPA Debit, which is a delayed PM. Seems expected

true furnace
#

So everything is good? Payment will come on my client's account (I am developer who integrated Stripe).

left plover
#

SEPA Direct Debit is a reusable, delayed notification payment method. This means that it can take up to 14 business days to receive notification on the success or failure of a payment after you initiate a debit from the customer’s account, though the average is five business days.

true furnace
#

Does that mean that user has paid and it is in pending status and after few days payment can be failed?

left plover
#

.completed is not enough to handle fulfilment in this case. Note that the payment_status field on the session object will be unpaid

left plover
#

Link above explains how to handle aync PMs like SEPA

true furnace
#

I am now listening to checkout.session.completed

left plover
#

Yeah, but that's not sufficient for delayed PMs as the link explains

#

That will fire when the session is completed but with SEPA that doesn't necessarily mean paid

true furnace
#

Can I then listen to all successful payments in checkout.session.async_payment_succeeded

left plover
#

No, that will only fire for sessions that were paid with an async PM

true furnace
#

So best way to modify current logic is:

  • in checkout.session.completed webhook if payment_status is unpaid I don't fullfill order
  • create new webhook for checkout.session.async_payment_succeeded which will be triggered only for delayed PMs like SEPA?
nocturne valley
#

Hi! I'm taking over this thread.

true furnace
#

Hi

nocturne valley
#

Yes that looks correct.

true furnace
#

Will checkout.session.async_payment_succeeded be triggered if user pays with visa and mastercard that is fulfilled immediately

nocturne valley
#

No, it's only triggered for async payment methods

true furnace
#

so SEPA Direct Debit and Sofort are async payment methods and I need to listen for those PMs in checkout.session.async_payment_failed

#

all other payments are immediate in checkout.session.completed

nocturne valley
#

The link I shared above mention all payment method that are async:

This step is only required if you plan to use any of the following payment methods: Bacs Direct Debit, Bank transfers, Boleto, Canadian pre-authorized debits, Konbini, OXXO, SEPA Direct Debit, SOFORT, or ACH Direct Debit.