#JamaicaF
1 messages · Page 1 of 1 (latest)
Sure, you'd just use the test data here which will trigger a decline for a variety of reasons (including an expired card): https://stripe.com/docs/testing#declined-payments
That wont work
if you scroll down past the first table youll see
The cards in the previous table can’t be attached to a Customer object. To simulate a declined payment with a successfully attached card, use the next one.
I need successful setup intent and then payment intent to fail specifically b/c of expiration
Did you try create/confirm a Setup Intent with the card data I shared?
ydx
sorry yes
it rejects those cards
it won't succeed for the expired card
the only sad path card that succeeds for setup intent is
Decline after attaching 4000000000000341 Attaching this card to a Customer object succeeds, but attempts to charge the customer fail.
like the docs say
but this is not the usecase i need
i want the card to be expired
Hmm, yeah in this case I don't think there's test credentials to fulfil that use case
no thats why i reached out
do you know any work around?
I tried adding a card and updating the expiration date, but it wont let me change it to a date in the past
and i tried adding a card set to expire in october and then waiting for november but b/c it's the happy path card, it doesnt care about what expiration date i give at checkout time
Unfortunately nothing comes to mind. Why exactly do you need to test that specific scenario?
we use setup intent for customers to add cards to their account for future payments
we want to be able to notify users if they are attempting to use an expired card at time of payment for our service
Right, but why that specific decline?
i'm not sure i understand the question
the scenario is a user has added a card to their account
the card expires at some point
You'd just handle it like any other exception, but the message contained in the error would be different
adn then the user is tryign to use that card for payment
its a pretty common scenario
but its a different decline code
Right, but we don't provide a happy path/test credentials to cater for every decline scenario
We don't return network declines code, you'd just see a expired_card code (which is all detailed here: https://stripe.com/docs/declines/codes)
thanks.
it sounds like there is no low lift solution for what the mobile dev needs, so logging off~
np!