#shouhu
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share a little more context about how you integrate Stripe (Checkout Session, PaymentIntent, etc), and where you set the return URL?
Sure! I'm using the payment element with payment intents. I'm setting the return URL on the page where checkout is happening via document.referrer or window.location.href and pass some additional params. When confirming the payment I pass this return URL variable to the return_url property on confirmParams. This seems to be working well, except for this little 314-2 part in the URL for which I cannot tell where it's coming from
For context, the payment element is being used embedded in an iframe on another website.
Thanks! Can you share a PaymentIntent ID where you saw that issue?
Of course 🙂 pi_3LzcQaDRxoS4foaB0GruIO9y
I just checked that PaymentIntent, and this is what I see for the return URL: https://example.dev/&additionalParams, and Stripe won't change that URL except adding some extra URL parameters as mentioned here https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment
So if you see a different URL, this might be due to a server configuration on your end.
This is what I thought was most likely as well but just wanted to make sure I wasn't missing anything. Thanks anyway though!