[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVT3CS6G2BBDBTRCVSNKDV":3,"skill-same:01M7CVT3CS6G2BBDBTRCVSNKDV":87},{"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":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":80},"01M7CVT3CS6G2BBDBTRCVSNKDV","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.","realsudarshan\u002FSD-skill","realsudarshan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128029723?v=4","01M7CTP2JEKQ9KBJ51NRZ2777Z","Sudarshan Dhakal","01M7CTP2JYR2PRY3BWGA30HX7J",0,"MIT","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-local-vercel-payments\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","92c2f40ebfad0c0aa3cc1faa89ffd6b23f9e8d1b","official-openai\u002Fopenai-local-vercel-payments","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill","https:\u002F\u002Fsd-skill.vercel.app","https:\u002F\u002Fgithub.com\u002Frealsudarshan","sudarshandhakal.com.np","Innvotative","2026-11-12 23:03:50",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":79},[69,72,75],{"tool":70,"command":71},"npx","npx skills add realsudarshan\u002FSD-skill --skill payments",{"tool":73,"command":74},"bunx","bunx skills add realsudarshan\u002FSD-skill --skill payments",{"tool":76,"command":77},"pnpm","pnpm dlx skills add realsudarshan\u002FSD-skill --skill payments","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-local-vercel-payments\u002FSKILL.md",true,[81],{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"agents\u002Fopenai.yaml","REFERENCE","参考文档",179,"https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Fofficial-openai\u002Fopenai-local-vercel-payments\u002Fagents\u002Fopenai.yaml",[88,97,105,113,121,129],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":92,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7CW5Y6EPMPMNDWE4EN2GXRX","winui-app","Bootstrap, develop, and design modern WinUI 3 desktop applications with C# and the Windows App SDK using official Microsoft guidance, WinUI Gallery patterns, Windows App SDK samples, and CommunityToolkit components. Use when creating a brand new app, preparing a machine for WinUI, reviewing, refactoring, planning, troubleshooting, environment-checking, or setting up WinUI 3 XAML, controls, navigation, windowing, theming, accessibility, responsiveness, performance, deployment, or related Windows app design and development work.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fwinui-app\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fwinui-app\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7CW5RWFX7616ENEG573VFWG","vercel-deploy","Deploy applications and websites to Vercel. Use when the user requests deployment actions like \"deploy my app\", \"deploy and give me the link\", \"push this live\", or \"create a preview deployment\".","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fvercel-deploy\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fvercel-deploy\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":92,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7CW5M4VZHQPWG764X1W0S3B","security-best-practices","Perform language and framework specific security best-practice reviews and suggest improvements. Trigger only when the user explicitly requests security best practices guidance, a security review\u002Freport, or secure-by-default coding help. Trigger only for supported languages (python, javascript\u002Ftypescript, go). Do not trigger for general code review, debugging, or non-security tasks.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fsecurity-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fsecurity-best-practices\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":92,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":19},"01M7CW5EBTWA7PQ54HYFT1YW39","playwright","Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via `playwright-cli` or the bundled wrapper script.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fplaywright\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fplaywright\u002FSKILL.md",[],[],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":92,"licenseFileUrl":125,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M7CW4DA7SZ4D9JMR3P7VJVM0","openai-docs","Use when the user asks how to build with OpenAI products or APIs and needs up-to-date official documentation with citations, help choosing the latest model for a use case, or model upgrade and prompt-upgrade guidance; prioritize OpenAI docs MCP tools, use bundled references only as helper context, and restrict any fallback browsing to official OpenAI domains.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fopenai-docs\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fopenai-docs\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":92,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":19},"01M7CW3EHY7X60KB9SYEMRD3YR","netlify-deploy","Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site\u002Frepo on Netlify, including preview and production deploys.","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fnetlify-deploy\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Frealsudarshan\u002FSD-skill\u002Fblob\u002Fmain\u002Freccomended\u002Fnetlify-deploy\u002FSKILL.md",[],[]]