#kaatelyng - Stripe Elements Next.js
1 messages · Page 1 of 1 (latest)
Hello, I’m hoping my question isn’t too out of scope for here
Okay so the first thing that would be helpful here is to save the template literal URL to a variable and log it to the console just prior to calling the .confirmPayment() function
And don't worry, we handle stuff like this plenty of times
It logs as “http://localhost:3000/purchase_completed”
Without the quotations of course
Right, yeah that makes sense. Okay so reviewing the error message again, this seems to be that Next.js router does not like the query parameters we append to the return URL
That’s what I assumed. I couldn’t quite find a solution in Next.js’ routing docs, is there any way I can make this work?
Perhaps you could try the Catch All routes approach? https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes
kaatelyng - Stripe Elements Next.js