#haoyee-webhook

1 messages ยท Page 1 of 1 (latest)

merry nimbus
#

hi there! it depends on a lot of factors really, there are multiple types of events that can be sent a webhooks when making a payment.

#

depends how you make the payment and which events you are listening to as to what the best answer is. Do you have more context on what you've built so far for accepting payments?

graceful jewel
#

I use checkout session

#

When the event is checkout session. Completed

merry nimbus
graceful jewel
#

cool, thanks

#

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

So I need to disable these payment methods when creating checkout?

merry nimbus
#

I wouldn't put it that way no

#

you always need webhooks (to listen to checkout.session.completed ). Some payment method (those ones) have async payment confirmation so for those you need the checkout.session.async_payment_succeeded event as well). The choice of payment methods is something you control (from https://dashboard.stripe.com/settings/payment_methods) and generally you should choose them based on what you want to offer and increase customer conversion instead of restricting them to simplify the backend integration

graceful jewel
#

How do I know the webhook needs to handle the checkout.session.async_payment_succeeded event, depending on the payment method?

merry nimbus
#

not sure I follow, can you clarify the question? are you asking how to know what payment method was used?

graceful jewel
#

I want to know how the async_payment_succeeded event is judged in the code

merry nimbus
#

judged by whom? In what code?

graceful jewel
#

yes

merry nimbus
#

?

#

sorry, you've completely lost me.

#

can you rephrase your question and ask again in detail please so I can try to help you?

graceful jewel
#

How to know that there is a subsequent asynchronous event for an order

merry nimbus
#

you could check the payment method type that was used when receiving the initial checkout.session.completed event(which is why I asked if that's what you meant)

graceful jewel
#

by Bacs Direct Debit, Boleto, Canadian pre-authorized debits, OXXO, SEPA Direct Debit, SOFORT, or ACH Direct Debit ?

merry nimbus
#

yes, you could check if the payment used one of those methods so then you know to expect a later async event

graceful jewel
#

According to the above, you can help me match Bacs Direct Debit, Boleto, Canadian pre-authorized debits, OXXO, SEPA Direct Debit, SOFORT, or ACH Direct Debit

merry nimbus
#

what do you mean? I think the enum is pretty easy, right?

#

like "Bacs Direct Debit" is bacs_debit , "Canadian pre-authorized debits" is acss_debit "SEPA Direct Debit" is sepa_debit

#

feel free to ask a more specific question if something is confusing

graceful jewel
#

who should sofort match

merry nimbus
#

sofort.

graceful jewel
#

ACH Direct Debit

merry nimbus
#

us_bank_account

graceful jewel
#

Canadian pre-authorized debit

#

๐Ÿ˜…

#

hi here, who Canadian should pre-authorized debit match

merry nimbus
#

I answered that above if you read up

#

it's acss_debit

#

the table tells you the exact mapping

graceful jewel
#

Sorry, my damn English