#alex_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1270925417527906427
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
The error says "Stripe: Argument "session" must be a string, but got: undefined (on API request to GET /v1/checkout/sessions/{session})"
Looks like you specified undefined when retriving the checkout session object.
it is working locally
So the next step is to put some logs in your code to confirm you pass in a valid checkout session ID.
i get this error locally Unable to post message to https://js.stripe.com. Recipient has origin http://localhost:3000.
i put a log here export default async function handler(req, res) {
console.log('session ' + req.query.session_id) and am not seeing it log anything
Do you see any error? are you checking the node.js console?
No, you should check your node.js console, not browser console
https://nextjs.org/docs/pages/building-your-application/configuring/debugging#server-side-code looks like you need to do this when using next.js
thanks
do you know why it would not be setting
Are you asking why req.query.session_id is undefined?
yes