#DavT
1 messages · Page 1 of 1 (latest)
Hi there! No, I haven't seen that error. You should be able to set any expiration date in the future for test card 4242.
Do you have a link to a test environment or the ID of a recent PaymentIntent that failed with this error?
yes.. let me grab that for you
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I assume the string beginning with "pi" in url above is what you are asking for
?
yep, that's it! taking a look
thank you kindly
please note the error response back is showing expiration of 2023, but we are sending dates in the future
im not sure why it keeps replying back with a 2023 date
not sure what you mean by "we are sending dates in the future". I see that a customer and payment_method were passed when the PaymentIntent above was created. The payment_method that was passed is the 4242 test card but the expiration date that was used for this card when it was attached to this customer was February 2023, so it's now expired
You can add the same test 4242 test card to the same customer with an expiration date in the future, then recreate the PI with the new payment_method ID
ok so the customer is me in this example testing... I always use the same email, so I am guessing I need to dig into our code more as it would seem at some step in our process we must be looking for existing customers... thank you for the advice...
last question... if I want to add the same card again with a new expiration date, is the best flow to remove the old card first and then add the new one?
Ah, I see!
In this case, since it's the same card number, you could actually update the expiration date on the existing saved PM: https://stripe.com/docs/api/payment_methods/update