#adam_api

1 messages ¡ Page 1 of 1 (latest)

steep saddleBOT
#

👋 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/1273628077255164025

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

wraith sorrel
#

Hello

#

If you are seeing a 402 in live on an async PaymentMethod then you can't replicate that exactly with a test payment method. Instead, you should mock the response for your testing.

hearty mauve
#

Ah, OK. I was thinking that was going to be answer unfortunately.

On LIVE we are seeing "PaymentIntent status:
requires_payment_method" coming back immediately with the 402.

On TEST we are seeing "PaymentIntent status:
processing" coming back immediately with the 200 and then a few moments later "PaymentIntent status:
requires_payment_method"

wraith sorrel
#

Can you share the PaymentIntent ID for the live mode example?

hearty mauve
wraith sorrel
#

Yep so that IBAN has basically been flagged as fraudulent so the attempt is blocked immediately. You can't repro this in test mode so you should mock that response in test mode as I noted.

hearty mauve
#

Thanks @wraith sorrel, that's a great help.

Can you just confirm, though, in cases where we do get a 4xx code back, a payment_intent will still be created and returned in the response body ?

wraith sorrel
#

Yep

#

Only a 400 would not result in a PaymentIntent