#alex_api

1 messages ยท Page 1 of 1 (latest)

stoic scrollBOT
#

๐Ÿ‘‹ 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.

upper pebble
#

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.

worn tundra
#

it is working locally

upper pebble
#

So the next step is to put some logs in your code to confirm you pass in a valid checkout session ID.

worn tundra
#

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

upper pebble
#

Do you see any error? are you checking the node.js console?

worn tundra
upper pebble
#

No, you should check your node.js console, not browser console

worn tundra
#

nothing is being logged there

upper pebble
worn tundra
#

ya its undefined

#

req.query.session_id

worn tundra
#

do you know why it would not be setting

upper pebble
#

Are you asking why req.query.session_id is undefined?

worn tundra
#

yes