[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CJCFK44PP1Z73ZE89EACDB":3,"skill-same:01M7CJCFK44PP1Z73ZE89EACDB":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":14,"repositoryHtmlUrl":61,"repositoryHomepageUrl":6,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":6,"updatedAt":64,"install":65,"resources":78},"01M7CJCFK44PP1Z73ZE89EACDB","payments",null,"Stripe payments integration guidance — native Vercel Marketplace setup, checkout sessions, webhook handling, subscription billing, and the Stripe SDK. Use when implementing payments, subscriptions, or processing transactions.","rossboyd\u002Fquickque","rossboyd","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3195729?v=4","01M7CG99NTNRFV0TWTZX9JY9CQ","rbyd","01M7CG99PH4WEP5P45VTBNPDB0",0,"MIT","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002F.tmp\u002Fplugins\u002Fplugins\u002Fvercel\u002Fskills\u002Fpayments\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: payments\ndescription: Stripe payments integration guidance — native Vercel Marketplace setup, checkout sessions, webhook handling, subscription billing, and the Stripe SDK. Use when implementing payments, subscriptions, or processing transactions.\nmetadata:\n  priority: 5\n  docs:\n    - \"https:\u002F\u002Fdocs.stripe.com\"\n    - \"https:\u002F\u002Fdocs.stripe.com\u002Fpayments\u002Fquickstart\"\n  sitemap: \"https:\u002F\u002Fdocs.stripe.com\u002Fsitemap.xml\"\n  pathPatterns:\n    - 'app\u002Fapi\u002Fwebhook\u002Fstripe\u002F**'\n    - 'app\u002Fapi\u002Fwebhooks\u002Fstripe\u002F**'\n    - 'src\u002Fapp\u002Fapi\u002Fwebhook\u002Fstripe\u002F**'\n    - 'src\u002Fapp\u002Fapi\u002Fwebhooks\u002Fstripe\u002F**'\n    - 'pages\u002Fapi\u002Fwebhook\u002Fstripe.*'\n    - 'pages\u002Fapi\u002Fwebhooks\u002Fstripe.*'\n    - 'app\u002Fapi\u002Fcheckout\u002F**'\n    - 'src\u002Fapp\u002Fapi\u002Fcheckout\u002F**'\n    - 'app\u002Fapi\u002Fstripe\u002F**'\n    - 'src\u002Fapp\u002Fapi\u002Fstripe\u002F**'\n    - 'lib\u002Fstripe.*'\n    - 'src\u002Flib\u002Fstripe.*'\n    - 'utils\u002Fstripe.*'\n    - 'src\u002Futils\u002Fstripe.*'\n  bashPatterns:\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*\\bstripe\\b'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*\\bstripe\\b'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*\\bstripe\\b'\n    - '\\byarn\\s+add\\s+[^\\n]*\\bstripe\\b'\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Fstripe-js\\b'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Fstripe-js\\b'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Fstripe-js\\b'\n    - '\\byarn\\s+add\\s+[^\\n]*@stripe\u002Fstripe-js\\b'\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b'\n    - '\\byarn\\s+add\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b'\n---\n\n# Stripe Payments Integration\n\nYou are an expert in Stripe payments for Vercel-deployed applications — covering the native Vercel Marketplace integration, Checkout Sessions, webhook handling, subscription billing, and the Stripe Node.js SDK.\n\n## Vercel Marketplace Setup (Recommended)\n\nStripe is a native Vercel Marketplace integration with sandbox provisioning and unified billing.\n\n### Install via Marketplace\n\n```bash\n# Install Stripe from Vercel Marketplace (auto-provisions sandbox + env vars)\nvercel integration add stripe\n```\n\nAuto-provisioned environment variables:\n- `STRIPE_SECRET_KEY` — server-side API key\n- `STRIPE_PUBLISHABLE_KEY` — client-side publishable key\n- `STRIPE_WEBHOOK_SECRET` — webhook endpoint signing secret\n\n### SDK Setup\n\n```bash\n# Server-side SDK\nnpm install stripe\n\n# Client-side SDK (for Stripe Elements \u002F Checkout)\nnpm install @stripe\u002Fstripe-js @stripe\u002Freact-stripe-js\n```\n\n### Initialize the Stripe Client\n\n```ts\n\u002F\u002F lib\u002Fstripe.ts\nimport Stripe from \"stripe\";\n\nexport const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {\n  apiVersion: \"2026-02-25.clover\",\n  typescript: true,\n});\n```\n\n## Checkout Sessions\n\n### Server Action (Recommended for 2026)\n\nServer Actions are the preferred pattern for creating Checkout Sessions in Next.js 15+, eliminating the need for API routes:\n\n```ts\n\u002F\u002F app\u002Factions\u002Fcheckout.ts\n\"use server\";\nimport { redirect } from \"next\u002Fnavigation\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function createCheckoutSession(priceId: string) {\n  const session = await stripe.checkout.sessions.create({\n    mode: \"payment\",\n    line_items: [{ price: priceId, quantity: 1 }],\n    success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fsuccess?session_id={CHECKOUT_SESSION_ID}`,\n    cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fcancel`,\n  });\n\n  redirect(session.url!);\n}\n```\n\n```tsx\n\u002F\u002F app\u002Fpricing\u002Fpage.tsx\nimport { createCheckoutSession } from \"@\u002Fapp\u002Factions\u002Fcheckout\";\n\nexport default function PricingPage() {\n  return (\n    \u003Cform action={createCheckoutSession.bind(null, \"price_xxx\")}>\n      \u003Cbutton type=\"submit\">Buy Now\u003C\u002Fbutton>\n    \u003C\u002Fform>\n  );\n}\n```\n\n### Create a Checkout Session (API Route)\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fcheckout\u002Froute.ts\nimport { NextResponse } from \"next\u002Fserver\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function POST(req: Request) {\n  const { priceId } = await req.json();\n\n  const session = await stripe.checkout.sessions.create({\n    mode: \"payment\", \u002F\u002F or \"subscription\" for recurring\n    payment_method_types: [\"card\"],\n    line_items: [{ price: priceId, quantity: 1 }],\n    success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fsuccess?session_id={CHECKOUT_SESSION_ID}`,\n    cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fcancel`,\n  });\n\n  return NextResponse.json({ url: session.url });\n}\n```\n\n### Redirect to Checkout (Client)\n\n```tsx\n\"use client\";\nimport { loadStripe } from \"@stripe\u002Fstripe-js\";\n\nconst stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n\nexport function CheckoutButton({ priceId }: { priceId: string }) {\n  const handleCheckout = async () => {\n    const res = await fetch(\"\u002Fapi\u002Fcheckout\", {\n      method: \"POST\",\n      headers: { \"Content-Type\": \"application\u002Fjson\" },\n      body: JSON.stringify({ priceId }),\n    });\n    const { url } = await res.json();\n    window.location.href = url;\n  };\n\n  return \u003Cbutton onClick={handleCheckout}>Subscribe\u003C\u002Fbutton>;\n}\n```\n\n## Webhook Handling\n\nStripe sends events to your webhook endpoint for asynchronous payment processing. Always verify the signature.\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fwebhook\u002Fstripe\u002Froute.ts\nimport { NextResponse } from \"next\u002Fserver\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\nimport Stripe from \"stripe\";\n\nexport async function POST(req: Request) {\n  const body = await req.text();\n  const signature = req.headers.get(\"stripe-signature\")!;\n\n  let event: Stripe.Event;\n  try {\n    event = stripe.webhooks.constructEvent(\n      body,\n      signature,\n      process.env.STRIPE_WEBHOOK_SECRET!\n    );\n  } catch (err) {\n    return NextResponse.json({ error: \"Invalid signature\" }, { status: 400 });\n  }\n\n  switch (event.type) {\n    case \"checkout.session.completed\": {\n      const session = event.data.object as Stripe.Checkout.Session;\n      \u002F\u002F Fulfill the order — update database, send confirmation, etc.\n      break;\n    }\n    case \"invoice.payment_succeeded\": {\n      const invoice = event.data.object as Stripe.Invoice;\n      \u002F\u002F Handle successful subscription renewal\n      break;\n    }\n    case \"customer.subscription.deleted\": {\n      const subscription = event.data.object as Stripe.Subscription;\n      \u002F\u002F Handle cancellation — revoke access\n      break;\n    }\n  }\n\n  return NextResponse.json({ received: true });\n}\n```\n\n**Important**: Webhook routes must read the raw body as text (not JSON) for signature verification. Do not add `bodyParser` or JSON middleware to webhook routes.\n\n## Subscription Billing\n\n### Create a Subscription Checkout\n\n```ts\nconst session = await stripe.checkout.sessions.create({\n  mode: \"subscription\",\n  line_items: [{ price: priceId, quantity: 1 }],\n  success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fdashboard`,\n  cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fpricing`,\n});\n```\n\n### Customer Portal\n\nAllow customers to manage their subscriptions:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fportal\u002Froute.ts\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function POST(req: Request) {\n  const { customerId } = await req.json();\n\n  const session = await stripe.billingPortal.sessions.create({\n    customer: customerId,\n    return_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fdashboard`,\n  });\n\n  return Response.json({ url: session.url });\n}\n```\n\n## Embedded Checkout (Recommended)\n\nStripe's Embedded Checkout renders inside your page via an iframe, keeping users on your domain while offloading PCI compliance to Stripe:\n\n```ts\n\u002F\u002F app\u002Factions\u002Fembedded-checkout.ts\n\"use server\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function createEmbeddedCheckout(priceId: string) {\n  const session = await stripe.checkout.sessions.create({\n    mode: \"payment\",\n    line_items: [{ price: priceId, quantity: 1 }],\n    ui_mode: \"embedded\",\n    return_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fsuccess?session_id={CHECKOUT_SESSION_ID}`,\n  });\n\n  return { clientSecret: session.client_secret! };\n}\n```\n\n```tsx\n\"use client\";\nimport { loadStripe } from \"@stripe\u002Fstripe-js\";\nimport { EmbeddedCheckoutProvider, EmbeddedCheckout } from \"@stripe\u002Freact-stripe-js\";\nimport { createEmbeddedCheckout } from \"@\u002Fapp\u002Factions\u002Fembedded-checkout\";\n\nconst stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n\nexport function CheckoutEmbed({ priceId }: { priceId: string }) {\n  return (\n    \u003CEmbeddedCheckoutProvider\n      stripe={stripePromise}\n      options={{ fetchClientSecret: () => createEmbeddedCheckout(priceId).then(r => r.clientSecret) }}\n    >\n      \u003CEmbeddedCheckout \u002F>\n    \u003C\u002FEmbeddedCheckoutProvider>\n  );\n}\n```\n\n## Stripe Elements (Custom Forms)\n\n```tsx\n\"use client\";\nimport { Elements, PaymentElement, useStripe, useElements } from \"@stripe\u002Freact-stripe-js\";\nimport { loadStripe } from \"@stripe\u002Fstripe-js\";\n\nconst stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n\nfunction CheckoutForm() {\n  const stripe = useStripe();\n  const elements = useElements();\n\n  const handleSubmit = async (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!stripe || !elements) return;\n\n    const { error } = await stripe.confirmPayment({\n      elements,\n      confirmParams: { return_url: `${window.location.origin}\u002Fsuccess` },\n    });\n\n    if (error) console.error(error.message);\n  };\n\n  return (\n    \u003Cform onSubmit={handleSubmit}>\n      \u003CPaymentElement \u002F>\n      \u003Cbutton type=\"submit\" disabled={!stripe}>Pay\u003C\u002Fbutton>\n    \u003C\u002Fform>\n  );\n}\n\nexport function PaymentForm({ clientSecret }: { clientSecret: string }) {\n  return (\n    \u003CElements stripe={stripePromise} options={{ clientSecret }}>\n      \u003CCheckoutForm \u002F>\n    \u003C\u002FElements>\n  );\n}\n```\n\n## Environment Variables\n\n| Variable | Scope | Description |\n|----------|-------|-------------|\n| `STRIPE_SECRET_KEY` | Server | API secret key (starts with `sk_`) |\n| `STRIPE_PUBLISHABLE_KEY` | Client | Publishable key (starts with `pk_`) |\n| `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` | Client | Alias exposed to browser via Next.js |\n| `STRIPE_WEBHOOK_SECRET` | Server | Webhook signing secret (starts with `whsec_`) |\n\n## Cross-References\n\n- **Marketplace install and env var provisioning** → `⤳ skill: marketplace`\n- **Webhook route patterns** → `⤳ skill: routing-middleware`\n- **Environment variable management** → `⤳ skill: env-vars`\n- **Serverless function config** → `⤳ skill: vercel-functions`\n\n## Official Documentation\n\n- [Stripe + Vercel Marketplace](https:\u002F\u002Fvercel.com\u002Fmarketplace\u002Fstripe)\n- [Stripe Node.js SDK](https:\u002F\u002Fdocs.stripe.com\u002Fsdks)\n- [Stripe Checkout](https:\u002F\u002Fdocs.stripe.com\u002Fpayments\u002Fcheckout)\n- [Stripe Webhooks](https:\u002F\u002Fdocs.stripe.com\u002Fwebhooks)\n- [Stripe Elements](https:\u002F\u002Fdocs.stripe.com\u002Fpayments\u002Felements)\n","# Stripe Payments Integration\n\nYou are an expert in Stripe payments for Vercel-deployed applications — covering the native Vercel Marketplace integration, Checkout Sessions, webhook handling, subscription billing, and the Stripe Node.js SDK.\n\n## Vercel Marketplace Setup (Recommended)\n\nStripe is a native Vercel Marketplace integration with sandbox provisioning and unified billing.\n\n### Install via Marketplace\n\n```bash\n# Install Stripe from Vercel Marketplace (auto-provisions sandbox + env vars)\nvercel integration add stripe\n```\n\nAuto-provisioned environment variables:\n- `STRIPE_SECRET_KEY` — server-side API key\n- `STRIPE_PUBLISHABLE_KEY` — client-side publishable key\n- `STRIPE_WEBHOOK_SECRET` — webhook endpoint signing secret\n\n### SDK Setup\n\n```bash\n# Server-side SDK\nnpm install stripe\n\n# Client-side SDK (for Stripe Elements \u002F Checkout)\nnpm install @stripe\u002Fstripe-js @stripe\u002Freact-stripe-js\n```\n\n### Initialize the Stripe Client\n\n```ts\n\u002F\u002F lib\u002Fstripe.ts\nimport Stripe from \"stripe\";\n\nexport const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!, {\n  apiVersion: \"2026-02-25.clover\",\n  typescript: true,\n});\n```\n\n## Checkout Sessions\n\n### Server Action (Recommended for 2026)\n\nServer Actions are the preferred pattern for creating Checkout Sessions in Next.js 15+, eliminating the need for API routes:\n\n```ts\n\u002F\u002F app\u002Factions\u002Fcheckout.ts\n\"use server\";\nimport { redirect } from \"next\u002Fnavigation\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function createCheckoutSession(priceId: string) {\n  const session = await stripe.checkout.sessions.create({\n    mode: \"payment\",\n    line_items: [{ price: priceId, quantity: 1 }],\n    success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fsuccess?session_id={CHECKOUT_SESSION_ID}`,\n    cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fcancel`,\n  });\n\n  redirect(session.url!);\n}\n```\n\n```tsx\n\u002F\u002F app\u002Fpricing\u002Fpage.tsx\nimport { createCheckoutSession } from \"@\u002Fapp\u002Factions\u002Fcheckout\";\n\nexport default function PricingPage() {\n  return (\n    \u003Cform action={createCheckoutSession.bind(null, \"price_xxx\")}>\n      \u003Cbutton type=\"submit\">Buy Now\u003C\u002Fbutton>\n    \u003C\u002Fform>\n  );\n}\n```\n\n### Create a Checkout Session (API Route)\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fcheckout\u002Froute.ts\nimport { NextResponse } from \"next\u002Fserver\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function POST(req: Request) {\n  const { priceId } = await req.json();\n\n  const session = await stripe.checkout.sessions.create({\n    mode: \"payment\", \u002F\u002F or \"subscription\" for recurring\n    payment_method_types: [\"card\"],\n    line_items: [{ price: priceId, quantity: 1 }],\n    success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fsuccess?session_id={CHECKOUT_SESSION_ID}`,\n    cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fcancel`,\n  });\n\n  return NextResponse.json({ url: session.url });\n}\n```\n\n### Redirect to Checkout (Client)\n\n```tsx\n\"use client\";\nimport { loadStripe } from \"@stripe\u002Fstripe-js\";\n\nconst stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n\nexport function CheckoutButton({ priceId }: { priceId: string }) {\n  const handleCheckout = async () => {\n    const res = await fetch(\"\u002Fapi\u002Fcheckout\", {\n      method: \"POST\",\n      headers: { \"Content-Type\": \"application\u002Fjson\" },\n      body: JSON.stringify({ priceId }),\n    });\n    const { url } = await res.json();\n    window.location.href = url;\n  };\n\n  return \u003Cbutton onClick={handleCheckout}>Subscribe\u003C\u002Fbutton>;\n}\n```\n\n## Webhook Handling\n\nStripe sends events to your webhook endpoint for asynchronous payment processing. Always verify the signature.\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fwebhook\u002Fstripe\u002Froute.ts\nimport { NextResponse } from \"next\u002Fserver\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\nimport Stripe from \"stripe\";\n\nexport async function POST(req: Request) {\n  const body = await req.text();\n  const signature = req.headers.get(\"stripe-signature\")!;\n\n  let event: Stripe.Event;\n  try {\n    event = stripe.webhooks.constructEvent(\n      body,\n      signature,\n      process.env.STRIPE_WEBHOOK_SECRET!\n    );\n  } catch (err) {\n    return NextResponse.json({ error: \"Invalid signature\" }, { status: 400 });\n  }\n\n  switch (event.type) {\n    case \"checkout.session.completed\": {\n      const session = event.data.object as Stripe.Checkout.Session;\n      \u002F\u002F Fulfill the order — update database, send confirmation, etc.\n      break;\n    }\n    case \"invoice.payment_succeeded\": {\n      const invoice = event.data.object as Stripe.Invoice;\n      \u002F\u002F Handle successful subscription renewal\n      break;\n    }\n    case \"customer.subscription.deleted\": {\n      const subscription = event.data.object as Stripe.Subscription;\n      \u002F\u002F Handle cancellation — revoke access\n      break;\n    }\n  }\n\n  return NextResponse.json({ received: true });\n}\n```\n\n**Important**: Webhook routes must read the raw body as text (not JSON) for signature verification. Do not add `bodyParser` or JSON middleware to webhook routes.\n\n## Subscription Billing\n\n### Create a Subscription Checkout\n\n```ts\nconst session = await stripe.checkout.sessions.create({\n  mode: \"subscription\",\n  line_items: [{ price: priceId, quantity: 1 }],\n  success_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fdashboard`,\n  cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fpricing`,\n});\n```\n\n### Customer Portal\n\nAllow customers to manage their subscriptions:\n\n```ts\n\u002F\u002F app\u002Fapi\u002Fportal\u002Froute.ts\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function POST(req: Request) {\n  const { customerId } = await req.json();\n\n  const session = await stripe.billingPortal.sessions.create({\n    customer: customerId,\n    return_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fdashboard`,\n  });\n\n  return Response.json({ url: session.url });\n}\n```\n\n## Embedded Checkout (Recommended)\n\nStripe's Embedded Checkout renders inside your page via an iframe, keeping users on your domain while offloading PCI compliance to Stripe:\n\n```ts\n\u002F\u002F app\u002Factions\u002Fembedded-checkout.ts\n\"use server\";\nimport { stripe } from \"@\u002Flib\u002Fstripe\";\n\nexport async function createEmbeddedCheckout(priceId: string) {\n  const session = await stripe.checkout.sessions.create({\n    mode: \"payment\",\n    line_items: [{ price: priceId, quantity: 1 }],\n    ui_mode: \"embedded\",\n    return_url: `${process.env.NEXT_PUBLIC_APP_URL}\u002Fsuccess?session_id={CHECKOUT_SESSION_ID}`,\n  });\n\n  return { clientSecret: session.client_secret! };\n}\n```\n\n```tsx\n\"use client\";\nimport { loadStripe } from \"@stripe\u002Fstripe-js\";\nimport { EmbeddedCheckoutProvider, EmbeddedCheckout } from \"@stripe\u002Freact-stripe-js\";\nimport { createEmbeddedCheckout } from \"@\u002Fapp\u002Factions\u002Fembedded-checkout\";\n\nconst stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n\nexport function CheckoutEmbed({ priceId }: { priceId: string }) {\n  return (\n    \u003CEmbeddedCheckoutProvider\n      stripe={stripePromise}\n      options={{ fetchClientSecret: () => createEmbeddedCheckout(priceId).then(r => r.clientSecret) }}\n    >\n      \u003CEmbeddedCheckout \u002F>\n    \u003C\u002FEmbeddedCheckoutProvider>\n  );\n}\n```\n\n## Stripe Elements (Custom Forms)\n\n```tsx\n\"use client\";\nimport { Elements, PaymentElement, useStripe, useElements } from \"@stripe\u002Freact-stripe-js\";\nimport { loadStripe } from \"@stripe\u002Fstripe-js\";\n\nconst stripePromise = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!);\n\nfunction CheckoutForm() {\n  const stripe = useStripe();\n  const elements = useElements();\n\n  const handleSubmit = async (e: React.FormEvent) => {\n    e.preventDefault();\n    if (!stripe || !elements) return;\n\n    const { error } = await stripe.confirmPayment({\n      elements,\n      confirmParams: { return_url: `${window.location.origin}\u002Fsuccess` },\n    });\n\n    if (error) console.error(error.message);\n  };\n\n  return (\n    \u003Cform onSubmit={handleSubmit}>\n      \u003CPaymentElement \u002F>\n      \u003Cbutton type=\"submit\" disabled={!stripe}>Pay\u003C\u002Fbutton>\n    \u003C\u002Fform>\n  );\n}\n\nexport function PaymentForm({ clientSecret }: { clientSecret: string }) {\n  return (\n    \u003CElements stripe={stripePromise} options={{ clientSecret }}>\n      \u003CCheckoutForm \u002F>\n    \u003C\u002FElements>\n  );\n}\n```\n\n## Environment Variables\n\n| Variable | Scope | Description |\n|----------|-------|-------------|\n| `STRIPE_SECRET_KEY` | Server | API secret key (starts with `sk_`) |\n| `STRIPE_PUBLISHABLE_KEY` | Client | Publishable key (starts with `pk_`) |\n| `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` | Client | Alias exposed to browser via Next.js |\n| `STRIPE_WEBHOOK_SECRET` | Server | Webhook signing secret (starts with `whsec_`) |\n\n## Cross-References\n\n- **Marketplace install and env var provisioning** → `⤳ skill: marketplace`\n- **Webhook route patterns** → `⤳ skill: routing-middleware`\n- **Environment variable management** → `⤳ skill: env-vars`\n- **Serverless function config** → `⤳ skill: vercel-functions`\n\n## Official Documentation\n\n- [Stripe + Vercel Marketplace](https:\u002F\u002Fvercel.com\u002Fmarketplace\u002Fstripe)\n- [Stripe Node.js SDK](https:\u002F\u002Fdocs.stripe.com\u002Fsdks)\n- [Stripe Checkout](https:\u002F\u002Fdocs.stripe.com\u002Fpayments\u002Fcheckout)\n- [Stripe Webhooks](https:\u002F\u002Fdocs.stripe.com\u002Fwebhooks)\n- [Stripe Elements](https:\u002F\u002Fdocs.stripe.com\u002Fpayments\u002Felements)\n",{"name":5,"metadata":24,"description":7},{"docs":25,"sitemap":28,"priority":29,"bashPatterns":30,"pathPatterns":43},[26,27],"https:\u002F\u002Fdocs.stripe.com","https:\u002F\u002Fdocs.stripe.com\u002Fpayments\u002Fquickstart","https:\u002F\u002Fdocs.stripe.com\u002Fsitemap.xml",5,[31,32,33,34,35,36,37,38,39,40,41,42],"\\bnpm\\s+(install|i|add)\\s+[^\\n]*\\bstripe\\b","\\bpnpm\\s+(install|i|add)\\s+[^\\n]*\\bstripe\\b","\\bbun\\s+(install|i|add)\\s+[^\\n]*\\bstripe\\b","\\byarn\\s+add\\s+[^\\n]*\\bstripe\\b","\\bnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Fstripe-js\\b","\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Fstripe-js\\b","\\bbun\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Fstripe-js\\b","\\byarn\\s+add\\s+[^\\n]*@stripe\u002Fstripe-js\\b","\\bnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b","\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b","\\bbun\\s+(install|i|add)\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b","\\byarn\\s+add\\s+[^\\n]*@stripe\u002Freact-stripe-js\\b",[44,45,46,47,48,49,50,51,52,53,54,55,56,57],"app\u002Fapi\u002Fwebhook\u002Fstripe\u002F**","app\u002Fapi\u002Fwebhooks\u002Fstripe\u002F**","src\u002Fapp\u002Fapi\u002Fwebhook\u002Fstripe\u002F**","src\u002Fapp\u002Fapi\u002Fwebhooks\u002Fstripe\u002F**","pages\u002Fapi\u002Fwebhook\u002Fstripe.*","pages\u002Fapi\u002Fwebhooks\u002Fstripe.*","app\u002Fapi\u002Fcheckout\u002F**","src\u002Fapp\u002Fapi\u002Fcheckout\u002F**","app\u002Fapi\u002Fstripe\u002F**","src\u002Fapp\u002Fapi\u002Fstripe\u002F**","lib\u002Fstripe.*","src\u002Flib\u002Fstripe.*","utils\u002Fstripe.*","src\u002Futils\u002Fstripe.*","main","907b1d897cc6743f7f133f8ea2021e1331b0b020",".codex\u002F.tmp\u002Fplugins\u002Fplugins\u002Fvercel\u002Fskills\u002Fpayments","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque","https:\u002F\u002Fgithub.com\u002Frossboyd","www.bigideasgroup.co.uk","2026-09-22 02:03:50",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add rossboyd\u002Fquickque --skill payments",{"tool":71,"command":72},"bunx","bunx skills add rossboyd\u002Fquickque --skill payments",{"tool":74,"command":75},"pnpm","pnpm dlx skills add rossboyd\u002Fquickque --skill payments","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002F.tmp\u002Fplugins\u002Fplugins\u002Fvercel\u002Fskills\u002Fpayments\u002FSKILL.md",true,[79],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"agents\u002Fopenai.yaml","REFERENCE","参考文档",174,"https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002F.tmp\u002Fplugins\u002Fplugins\u002Fvercel\u002Fskills\u002Fpayments\u002Fagents\u002Fopenai.yaml",[86,95,103,110,117,125],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":91,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7CJSS21K09H3ZQZMPFR4ZAG","skill-installer","Install Codex skills into $CODEX_HOME\u002Fskills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fskill-installer\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fskill-installer\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":99,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7CJSM1F4E7RBXCS3C18EFBY","skill-creator","Create or update a Codex skill with appropriately scoped instructions and any needed supporting resources.","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fskill-creator\u002Flicense.txt","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fskill-creator\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7CJSGF2PJM504Q6TZCNT27C","review-agent","Perform a read-only, defect-first review of a specified code change and return every actionable finding. Use when another agent delegates review of uncommitted changes, a base-branch diff, a commit, or custom review instructions.","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Freview-agent\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7CJSBQTPFEQYZF4VWS7QZ3N","plugin-creator","Create and scaffold plugin directories for Codex with a required `.codex-plugin\u002Fplugin.json`, optional plugin folders\u002Ffiles, valid manifest defaults, and personal-marketplace entries by default. Use when Codex needs to create a new personal plugin, add optional plugin structure, generate or update marketplace entries for plugin ordering and availability metadata, or update an existing local plugin during development with the CLI-driven cachebuster and reinstall flow.","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fplugin-creator\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M7CJS5BHJZKA16353PVZGC50","openai-docs","Use for Codex models\u002Fpricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs\u002Fproducts and ChatGPT Work. Also use for model choice\u002Fmigration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat\u002FWork\u002FCodex comparisons. Do not use for generic app\u002Fsoftware tasks that merely mention Codex.","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fopenai-docs\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fopenai-docs\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":90,"licenseFileUrl":129,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":19},"01M7CJRY1FC048P3RF4YQZ6J8B","imagegen","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fimagegen\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frossboyd\u002Fquickque\u002Fblob\u002Fmain\u002F.codex\u002Fskills\u002F.system\u002Fimagegen\u002FSKILL.md",[],[]]