#johnwick_api

1 messages ¡ Page 1 of 1 (latest)

pastel martenBOT
#

👋 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.

warm slate
#

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.

glossy carbon
#

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

warm slate
#

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?

glossy carbon
#

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

warm slate
glossy carbon
#

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

warm slate
#

Okay got it thanks. Will try this out.

pastel martenBOT
warm slate
#

Is there any test card in 3ds that achieves this though?This is much similar to my scenario but I need a 3DS card

floral vale
#

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 ?

warm slate
#

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.

floral vale
#

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

warm slate
#

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"
    }
}```
#
--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?

floral vale
#

You are sending an old year

#

You should send a future year

warm slate
#

oh so backward months and years don't work is it

#

even in the test environment