#johnwick_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1426142249099460691
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
So basically as the question says, I want a replicate a real world scenario where a card is active at a point of time and in future it expires.
Should be possible to do by manually updating the PM/card on the sub after the initial payment, and then simulating time advancements with a test clock
There's no one test card to test that scenario
So what you mean is, I create a payment method the first time using the card when it is active. Then I update the payment method so that it expires and try to use the same PM again correct?
Initialise a subscription with a card that will successfully pay the first invoice (4242), then update the default PM on the sub to use a card that will decline/is expired
Sure understood. Also what if I update the PM exp year here using the API just for testing purposes? https://docs.stripe.com/api/payment_methods/update#update_payment_method-card-exp_year
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Not sure, maybe. Declines on expired cards aren't always guaranteed as the bank will sometimes forgive them based on other signals
You're better off using this card to simulate an expired decline: 4000000000000069
Okay got it thanks. Will try this out.
Is there any test card in 3ds that achieves this though?This is much similar to my scenario but I need a 3DS card
Hey! Taking over for my colleague.
Is there any test card in 3ds that achieves this though?
Nope that one doesn't requires 3ds
You want to test 3DS after creating the Subscription or testing the payment failure ?
Basically I want to add a 3DS card because my system only accept 3DS cards currently. I add a card, do the first payment. Want to simulate a card expiry for the second payment but using the same payment method.
In this case you can use this card:
4000002760003184
and in the next invoice/renewal, don't accept the 3DS so the payment will fails
Ok got it. Also why am I getting an error when I try to update a payment method?
https://docs.stripe.com/api/payment_methods/update?lang=curl#update_payment_method-card-exp_month
"error": {
"code": "invalid_expiry_year",
"doc_url": "https://stripe.com/docs/error-codes/invalid-expiry-year",
"message": "Your card's expiration year is invalid.",
"param": "exp_year",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_USczFEC0PmEmHf?t=1760092385",
"type": "card_error"
}
}```
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic c2tfdGV*********' \
--data-urlencode 'card%5Bexp_year%5D=2023'```
Is this the right way to use this API?