We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Stripe: Argument "session" must be a string, but got: undefined (on API request to GET /v1/checkout/sessions/{session})
GET /v1/checkout/sessions/{session}
Success page is just like the template
import { Button } from "@/components/ui/button"; import NavBar from "@/components/wrapper/navbar"; import Link from "next/link"; import Stripe from "stripe"; // Initialize Stripe with your secret key const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!); export default async function SuccessPage(props: { searchParams: Promise<{ [key: string]: string | string[] | undefined }>; }) { const searchParams = await props.searchParams; const session = await stripe.checkout.sessions.retrieve( searchParams?.session_id as string ); const jsonString = JSON.stringify(session, null, 2); return ( <main className="flex min-w-screen flex-col items-center justify-between"> <NavBar /> <h1 className="mt-[35vh] mb-3 scroll-m-20 text-5xl font-semibold tracking-tight transition-colors first:mt-0"> Welcome to Nextjs Starter Kit 🎉 </h1> <p className="leading-7 text-center w-[60%]">Let's get cooking</p> <Link href="/dashboard" className="mt-4"> <Button>Access Dashboard</Button> </Link> </main> ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Error: Stripe: Argument "session" must be a string, but got: undefined (on API request to
GET /v1/checkout/sessions/{session}
)Success page is just like the template
The text was updated successfully, but these errors were encountered: