#johan_unexpected

1 messages ¡ Page 1 of 1 (latest)

opal sparrowBOT
#

👋 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/1400733907581665373

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

proper viper
#

Hello! Can you provide me an example subscription where this behaviour is occuring?

worldly socket
#

sub_1RU4HRPiRBRvqy3Fyr2wIYGK

#

sure! I have shared one above

#

I don't understand why a dispute gets created when the payment fails due insufficient funds?

visual wing
#

I don't see any failed payment on the subscription you shared. for that invoice, it was paid, then disputed. It's not that it failed payment upfront, that's why it didn't cancel the subscription.

https://docs.stripe.com/payments/payment-methods/bacs-debit#timing

In some cases, the bank might notify us of a payment failure after the payment has been marked as successful in your Stripe account. In this case the payment failure is identified as a dispute with the appropriate reason code.

This explains what you're seeing ^

Learn how to accept payments with Bacs Direct Debit in the UK.

#

i guess what you can consider is setting the subscription to cancel too if there's a dispute?

worldly socket
#

but the dispute got created because the invoice wasn't paid

#

not sure if that's a correct behaviour?

#

is only happening to BACS DD subscriptions

#

subscriptions paid by card are fine

#

you can see all of these subscriptions got a dispute creted because the payment failed

#

acct_1QkPAHPiRBRvqy3F

worldly socket
#

what's the right webhook to listen to and cancel the subscription?

visual wing
#

You can actually configure it in your billing settings

visual wing
#

but the dispute got created because the invoice wasn't paid
not sure if that's a correct behaviour?

This goes into how BACS debit itself works. If I remember correctly, BACS debit itself operates on negative confirmation (you do not receive notices of success, only failures). Stripe marks the payment as successful after X days (taking into account that most notices of payment failure come in before that time). However, in some cases after we've already marked the payment as successful, the bank then notifies us that the payment failed

worldly socket
#

can I do this globally or per connected account?

#

the configuration of the billing settings

worldly socket
visual wing
#

oh, you're using Direct Charges on a Custom Account which is not a recommended flow. You can't configure this setting for your Custom connected accounts.

I guess you don't really have a choice, you're going to need to listen for the dispute webhook event and cancel the subscription then. You would need to listen for charge.dispute.created

worldly socket
#

yeah would you agree to handle this only when the "reason": "insufficient_funds" ? I assume if the dispute is for a real reason we want to handle it manually instead of cancelling the subscription

visual wing
#

that would really be a business decision, maybe you would want to consult with your team?

worldly socket
#

yeah you're right

#

thanks a lot Alex