#ThomasPrice-vercel

1 messages · Page 1 of 1 (latest)

hybrid wing
#

hi! you wouldn't really visit that URL directly in a browser, it's mean to be hit by a POST request.

vale matrix
#

Yeah it is.. but vercel treats it as a url

hybrid wing
#

you're supposed to have e.g a <form action="/create=checkout-session"> like we describe in the docs

vale matrix
#

The values are just the products in the cart, dont worry about them

hybrid wing
#

do you have a link to the page?

vale matrix
#

the vercel?

#

I appreciate the help btw 🙂

hybrid wing
#

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?

vale matrix
#

on vercel's website, its just a page not found, it doesnt really give alot of info

hybrid wing
#

@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.