#canopus1io

1 messages · Page 1 of 1 (latest)

crude mountainBOT
novel gazelle
dawn cobalt
#

I don't think you can do anything with the Payment Method after that, since we only get that error back from the bank when an account is no longer open. It's in an unusable state in other words. So, handling that error requires that you create a new account entirely.

novel gazelle
#

so, I should handle specific payment error messages and delete the payment method immediately?

#

what about the other cases, Account closed makes sense to delete the payment method

dawn cobalt
#

You don't really need to delete the Payment Method, but deleting it could help to make sure it isn't confused as a viable option for payment.

There are many different error messages for payment failures, so I can't really say how to handle every individual one: https://stripe.com/docs/declines/codes

Understand what decline codes mean and how you can resolve them when a charge is declined.

novel gazelle
#

these are primarily from card payment methods, though

dawn cobalt
novel gazelle
dawn cobalt
novel gazelle
#

I have not found a way to filter it out, that was what I wanted to do initially

#

i could not find an attribute on the PaymentMethod object to indicate this state (invalid mandate)

#

one sec, let me get an example of the payment method data i have

dawn cobalt
#

I don't think there is a way to tell from the Payment Method. Your best bet would be deleting the Payment Method when the payment fails. If you can't delete it, then you should set up a webhook that listens for payment failures and sets metadata on the Payment Method object that tells you it is invalid.

novel gazelle
#

there must be a list of errors that invalidates and existing mandate for bank accounts

#

not all ACH errors do this, an example is Insufficient funds.

dawn cobalt
novel gazelle
#

based on this, the it seems the only error message that the payment method is still usable is 'insufficient funds', for all the others, the payment methods are no longer usable.

does this sound right?

dawn cobalt
#

Yeah, that sounds right

novel gazelle
#

I get info about the status of the charge from the charge object's failure_code and failure_message

"failure_code": "no_account",
"failure_message": "The customer's bank account could not be located.",

#

ok, thanks for your help, I'm going to work on the implementation

#

I'll post back here if I have further questions on this topic