#anadalg
1 messages · Page 1 of 1 (latest)
Hello there
Hi!
The best way to test scenarios like this is to mock the response that you will receive. For saved cards we don't actually decline the attempt if the expiry date has passed since we still talk to the bank and many times they know whether the cardholder has received a new card or not and whether they want to authorize or decline.
Ok!
in the case of a card expired I'm assuming I will receive a "payment_intent.payment_failed" event containing a PaymentIntent object.
and
inside that PaymentIntent object a list of "charges" will be present with the "expired_card" value in the "failure_code" field of the "Charge" object. Im right?
Yep that's correct
great, thank you!
Sure!