#hero.xyz

1 messages · Page 1 of 1 (latest)

tardy wadiBOT
rigid axle
#

hi there!

covert spear
#

Hi

rigid axle
#

can you share the Checkout Session ID (cs_xxx)?

covert spear
rigid axle
#

I see it in the screenshot you shared, in red

covert spear
#

Yeah, but I don't know from where it is coming

rigid axle
#

can you copy paste it here?

covert spear
#

Okay

rigid axle
#

cs_test_xxx

covert spear
#

Error: {"digest":"NEXT_REDIRECT;replace;https://checkout.stripe.com/c/pay/cs_test_a15p4t4Z1mkFTbWDDC0nZysTEM36MGql38FqLHUbGcsO9nNjpOLf0x8moJ#fidkdWxOYHwnPyd1blpxYHZxWjA0SmNVN2xWQ21vU2Rgf0ZIZ2Y9NDBGdWFOVG0ybV9qXGpXNGFcMVRvM19Ra2BHR1BCQzR8RDZvM1JLTnNOMEZmM0dfM0s9Z0p%2FZHMzTUs2X0l2SGZ8QUpANTVxcGhAcjdVRCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl;303;","mutableCookies":

balmy tapir
#

Assuming it's a Server Action, which is what it looks like

covert spear
#

ya it's a server action

rigid axle
#

this is the ID: cs_test_a15p4t4Z1mkFTbWDDC0nZysTEM36MGql38FqLHUbGcsO9nNjpOLf0x8moJ
it looks like it was correct created. so when do you get that error? when you try to redirect the user to the Checkout Session page?

covert spear
balmy tapir
#

Move the const to be a let outside the try/block scope

#
let checkoutSession: Stripe.Checkout.Session;
try {
  checkoutSession = await stripe.checkout.sessions.create({});
} catch {
    ...
}

redirect(checkoutSession.url as string)
covert spear
#

Issue fixed

covert spear
#

Just need to change that error section

balmy tapir
#

Cool!

covert spear
#

Tysm for the time

balmy tapir
#

No problem, glad I could help!

covert spear
#

Really appreciate the quick responses