#dorian6730_best-practices

1 messages ¡ Page 1 of 1 (latest)

whole solarBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1295454970522370058

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

atomic haven
#

For ACH you would get a payment_intent.processing event when we try to charge their account and then you will later get a
payment_intent.succeeded or payment_intent.payment_failed event based on whether that payment succeeds or fails

whole solarBOT
gentle blade
#

Right I got that thanks

#

That applies to both one-time anmd sibscription payments correct?

steep fjord
#

Correct

gentle blade
#

Got it thanks

#

What about card?

#

Im currently listening for invoice.paid
invoice.payment_failed for card subscription payments

steep fjord
#

Yup those events should also work for non-card subscription payments

gentle blade
#

Ah ok

#

So which is better? Those or payment?

#

For subscriptions

steep fjord
#

It really depends on how your integration consumes the events and uses the information. If all you want to know is if the payment succeeded or failed, you can just listen to invoice.* events for subscriptions without looking at PaymentIntents individually

gentle blade
#

OK thanks

#

One more Q - should I not bother with these?

payment_intent.canceled
payment_intent.partially_funded
payment_intent.requires_action

steep fjord
#

payment_intent.requires_action is generated when the bank/issuer asks for customer authentication/3DS.. So you'd likely want to listen to these so you can take appropriate actions like bringing customer back on your site to complete the action.

payment_intent.partially_funded is for bank transfers payment method which you can ignore.

payment_intent.canceled is generated in case let's say the invoice gets voided. Totally upto you if you want to listen to it to handle the case

gentle blade
#

Got it

#

Thanks

#

Also - I know if a subscription's first payment failes, it goes to Incomplete and then is cancelled if not rectified within 24 hours. What if a subsequent payment fails?

steep fjord