#jean-baptiste-r_unexpected
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/1225449702040797217
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello ๐
Lemme explain our implementation to be sure you have all informations:
Here is how we work:
When someone books something, (i.e. when he has given his payment informations) the front app requests the back app. The back application creates the booking in database (with "WAITING" state), then the payment intent from Stripe and send the information of the payment intent (like client secret code) to the front application.
Then the front application uses these information to send payment method and confirm the payment to Stripe(*).
Last, Stripe uses our webhook to tell us if the payment has succeeded or not. (And so the webhook changes the booking in our database to "PAID" or "NOT PAID")
I think it's a common implementation, but maybe it's important to tell you so if we did an error, then you know. I can do a little plan if it can help, just ask. ๐
My problem: When a user uses a test card, the front application will send the test card to stripe (step with *) but Stripe will answer with a 402 error and will send nothing so our webhook.
Thank you for your time ๐
You can't use test cards in live mode
Can you share the request id where you get a 402?
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Not sure of which Id you're requesting x:
This one ? : pi_3P1nBICN7b44IDnX0UIozKic
That's the payment intent I created with a test card in production environnement
Why are you using test cards in production?
That's completely expected that that won't work
Because a user tried to use one, and we wan't to not take in account a booking when a test card has been used
That's why I expected Stripe to send a request to our webhook in this case
Ah no
We just can see it's a test card and immediately return a 402
Payment processing isn't even attempted
So no need to notify you of anything
Payment Intent is still in a requires_payment_method state
So I need to ask the user to give us a new card and send the same request with new information ?