shako@dev-box/home/shako/acme-app
❯ Add Stripe Checkout for the Pro plan, with a webhook that turns on the plan
● I'll look at the billing code first, then add the checkout route and the webhook.
● Read(app/billing/page.tsx)
⎿ Read 84 lines
● Search(pattern: "plan", path: "lib/db")
⎿ Found 3 files
● Write(app/api/checkout/route.ts)
⎿ Wrote 46 lines to app/api/checkout/route.ts
● Update(app/billing/page.tsx)
⎿ Updated app/billing/page.tsx with 12 additions and 3 removals
● Bash(npm test -- billing)
✓ PASS tests/billing.test.ts (9 tests, 1.8 s)
● The checkout works. Now the webhook: checkout.session.completed sets plan = "pro".
● Write(app/api/stripe/webhook/route.ts)
✻ Verifying the webhook signature… (38s · ↓ 2.1k tokens · esc to interrupt)
❯
Shako Cloud Workspace
- Manage VMs
- Remote Coding with terminal first, lightweight ADE
- Mobile friendly
- Shako CLI installed and logged in on each VM
Shako
Log in to Shako
Enter your email. We send you a link to log in. A new address gets a new account.