#Lorey-payment-intent
1 messages ยท Page 1 of 1 (latest)
Hi river ๐
Can you share the example Payment Intent ID that you don't receive Payment Intent when user is sent back to your web application?
Actually I don't know to which Payment Intent this happened because i don't have the reference ๐
What type of integration are you using?
So our stack is divided in a NuxtJS front-end and a Laravel (PHP) back-end.
We're creating payment intents on the front-end. The user gets redirected to our back-end from Stripe, which in turn redirects the user back to our front-end
Because our back-end is stateless, we don't have a session of the user so we rely on this payment_intent parameter to figure out which payment it involves.
Hi! I'm taking over this thread.
What are you using on the frontend to collect payment information and confirm the PaymentIntent? The Payment Element?
Hi soma
We use some Stripe Element but we call the payment method's confirm function ourselves
For clarification ๐
So the return url we send to Stripe is plain, and we expect Stripe to redirect the user to that given URL with an additional payment_intent query parameter
This is not documented in the Stripe docs but in my last conversation with one of your colleagues it was made clear to me that this was supported
If you call confirmPayment with a return URL, then yes you should have the PaymentIntent ID autoamtically set in the URL, as mentioned here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment
Oh so it is documented!
Cool, that's good to know.
So if there is no PaymentIntent we can just dismiss the request?
As far as I know the PayementIntent should always be in the URL, so maybe some of your users try to directly access your return_url without submitting the payment form? Not sure.
So if there is no PaymentIntent we can just dismiss the request?
I would recommend to add some logging on your end to try to understand what is happening exactly. If my idea above is correct, then sure you can just dismiss the request.
Alright thank you for the clarification! And it's good to know this is documented behaviour. Thanks soma!