#ThomasPrice-vercel
1 messages · Page 1 of 1 (latest)
hi! you wouldn't really visit that URL directly in a browser, it's mean to be hit by a POST request.
Yeah it is.. but vercel treats it as a url
you're supposed to have e.g a <form action="/create=checkout-session"> like we describe in the docs
do you have a link to the page?
I see the behaviour you mention but I have never used Vercel so I don't know what the issue might be
did you read the FAQ article the error message links to?
on vercel's website, its just a page not found, it doesnt really give alot of info
@vale matrix maybe it makes more sense to use this guide https://vercel.com/guides/getting-started-with-nextjs-typescript-stripe instead of the vanilla Stripe one?
They do things a different way with their own concept of a backend API route and it's probably needed.
In your ./pages/api folder create a new API route:
checkout_sessions/index.ts
In this function create a new CheckoutSession and return the its id which is used to initiate the redirect to Stripe.
the other thing I see is that your Express server is explicitly running on port 4242
I feel like the problem is probably along the lines that your actual Express server is not even being hit or maybe isn't running. But I know very little about how a server like that is deployed on Vercel.