Stripe starter module
Setup
Maps required Stripe settings and integration points into your app.
- Files
- 17
- Lines
- 725
- Languages
- Config + Markdown + TypeScript + JSON
Included files
This page lists paths and purposes, not source contents.
.env.example
Configuration required by this starter pack.
Config
47 lines
ADAPT.md
Give these instructions to the coding agent working in the buyer's Next.js project.
Markdown
140 lines
app/api/stripe/checkout/route.ts
POST /api/stripe/checkout starts a Stripe-hosted Checkout Session for the one-time product.
TypeScript
5 lines
app/api/stripe/usage-checkout/route.ts
POST /api/stripe/usage-checkout subscribes a customer to the metered usage price.
TypeScript
5 lines
app/api/stripe/verify/route.ts
GET /api/stripe/verify reports missing settings and confirms a test-mode Stripe connection.
TypeScript
5 lines
app/api/stripe/webhook/route.ts
POST /api/stripe/webhook is the only path that grants access after payment.
TypeScript
5 lines
app/buy/route.ts
A working purchase page: shows every catalog product with a Buy button that starts checkout.
TypeScript
56 lines
app/checkout/cancel/route.ts
Browser return page when a buyer leaves Stripe Checkout without paying.
TypeScript
20 lines
app/checkout/success/route.ts
Browser return page after Stripe redirects a buyer back from a completed payment.
TypeScript
29 lines
OPERATIONS.md
The code handles the machines.
Markdown
19 lines
package.json
Configuration required by this starter pack.
JSON
18 lines
README.md
This starter gives a Next.js App Router application a secure Stripe Checkout flow, signed webhook handling, one-time fulfillment, subscription lifecycle helpers, transactional email, and a readable verification route.
Markdown
99 lines
src/setup/create-one-time-product.ts
One-off setup script: creates every catalog product and price in Stripe test mode.
TypeScript
102 lines
src/setup/create-usage-meter.ts
One-off setup script: creates the usage billing meter and metered monthly price in Stripe
TypeScript
115 lines
starter.json
Configuration required by this starter pack.
JSON
6 lines
TROUBLESHOOTING.md
Find your symptom, apply the fix.
Markdown
39 lines
tsconfig.json
Configuration required by this starter pack.
JSON
15 lines
Questions about setup
Can I use the Stripe starter with an existing app?
Yes. Click the onboarding pill on this page and paste the prompt into your AI chat; your agent pulls the pack and maps the pack's database, email, and access points to the services your app already uses.