Implement Stripe checkout and billing portal #8

Open
opened 2026-03-17 16:13:20 +00:00 by grenade · 0 comments
Owner

Current state

POST /billing/checkout and POST /billing/portal return HTTP 500 — Stripe integration is not implemented.

Work required

  • Add stripe crate dependency
  • Add stripe_customer_id and stripe_subscription_id to users table (migration)
  • POST /billing/checkout: create Stripe Checkout session, return redirect URL
  • POST /billing/portal: create Stripe Billing Portal session for existing customer
  • POST /billing/webhook: Stripe webhook handler to update subscription status on events (checkout.session.completed, customer.subscription.updated/deleted)
  • Config: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, price IDs per tier
  • Frontend: upgrade/manage subscription buttons linked to Stripe-hosted pages
## Current state `POST /billing/checkout` and `POST /billing/portal` return HTTP 500 — Stripe integration is not implemented. ## Work required - Add `stripe` crate dependency - Add `stripe_customer_id` and `stripe_subscription_id` to `users` table (migration) - `POST /billing/checkout`: create Stripe Checkout session, return redirect URL - `POST /billing/portal`: create Stripe Billing Portal session for existing customer - `POST /billing/webhook`: Stripe webhook handler to update subscription status on events (`checkout.session.completed`, `customer.subscription.updated/deleted`) - Config: `STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET`, price IDs per tier - Frontend: upgrade/manage subscription buttons linked to Stripe-hosted pages
grenade added this to the Billing & Subscriptions milestone 2026-03-17 16:13:20 +00:00
grenade added this to the strategies gamified project 2026-03-17 16:25:10 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: swym/swym#8