Stripe

CCCPaid

Infra · Build

Subscriptions, invoices, tax and a customer portal through one API; the billing layer of a membership.

What it is

Stripe is the payments platform most software companies bill through. For a membership product the relevant pieces are Checkout (a hosted payment page you redirect to), Billing (products, prices, subscriptions, proration, pauses, trials if you want them), the Customer Portal (a hosted page where members change plans, update cards and cancel), Tax (automatic VAT and sales tax by location), and webhooks that tell your system when a payment succeeded, failed or a subscription changed. Pricing is per transaction with no monthly fee on the standard plan; Tax and some features add a percentage.

The design decision it forces is good: your database never stores card data and rarely stores prices; it stores the Stripe customer id and the current subscription state, updated by webhooks, and everything else is a redirect.

Where it fits in the AI OS

Build, the money layer of a product. In the AI business view it is also the only source of truth for MRR, churn and refunds, so the admin dashboard reads it directly.

Insider notes

members

How Serge's stack uses it

The membership spec's billing section is written around Stripe: Paid at $39 a month or $348 a year, Gold at $199 a month or $1,990 a year with 30 seats by application, no trial, a 14-day refund on the first Paid payment except when git access has already been provisioned, upgrades prorated, downgrades and cancellations at period end, a 1-3 month pause on Paid. A Stripe Tax spike is one of the open items before launch. The live bulaev.ai site already has the Stripe SDK wired in from its platform.

Setup in 5 minutes

  1. Create the account, stay in test mode; create two Products with monthly and yearly Prices.
  2. From a Worker, create a Checkout Session with mode: 'subscription', the price id and your success_url; redirect the member.
  3. Add a webhook endpoint for checkout.session.completed, customer.subscription.updated and .deleted; verify the signature with the webhook secret.
  4. On each event, write stripe_customer_id, status and current_period_end to your members table.
  5. Enable the Customer Portal and link to it from the account page.

Alternatives

  • Paddle / Lemon Squeezy — merchant-of-record services that handle global tax and invoicing for you, for a higher percentage.
  • Polar — merchant of record aimed at developers and open-source.
  • Chargebee / Recurly — subscription management on top of a payment processor; heavier than a small company needs.
Stripe — Infra | Serge Bulaev