#quentinnprt
1 messages ยท Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- quentinnprt, 2 hours ago, 12 messages
I think the way I'd expect this to work is you add a card to a Customer and enter exp_month:12 exp_year:2023 for example when creating the PaymentMethod; then you create a monthly subscription for the Customer and advance a clock to like Feburary 2024 and hopefully observe that some of the Invoice payments failed.
Oh ok, I'll try this way, thanks ๐
I haven't tried it myself so not sure if that works(it's quite possible that inside the test clock when we process the actual underlying payment we are comparing the real "wall time" against the card expiry and not the TestClock time) but if this is supported that's what I'd epxect to work
Any other solution if it doesn't work ?
hmm can't think of one
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
okok, thank you ๐
I am not sure card expiry works with test clocks.
Test clocks only apply to a subset of functionality, like Subscriptions and Invoices.
So is there any way to test that ?
I would replace the test card with one that produces the expired card decline: https://stripe.com/docs/testing#declined-payments
I can't attach a expired card to the customer
Oh, right, makes sense.
I don't think there's another way to test this, unfortunately. You should rely on generic errors that you can get with "Always authenticate" card https://stripe.com/docs/testing#regulatory-cards
Okok, thank you
Happy to help.