Billing
Stripe is optional. Without it, teams stay on the free plan or operator-assigned tiers.
Plans
| Plan | Rate limit | Active inboxes | Emails/month | How |
|---|---|---|---|---|
| free | 60/min | 10 | 500 | Get a free key |
| pro, $29/month | 300/min | 100 | 5000 | Upgrade or operator |
| enterprise | 600/min | 500 | no cap | Operator, Dedicated Resend |
| legacy | 120/min | 500 | no cap | Single wrangler API_KEY |
Without Stripe (today)
npm run issue:key:db -- pilot-name
# free plan · dashboard works · no Upgrade button
Manual pro: operator runs npm run team:plan -- TEAM_ID pro.
With Stripe (Pro self-serve)
- Stripe product + recurring price →
STRIPE_PRICE_PRO - Webhook
POST /webhooks/stripe(see events below) - Worker secrets:
STRIPE_SECRET_KEY,STRIPE_WEBHOOK_SECRET,STRIPE_PRICE_PRO
npm run wizard:stripe
npm run wizard:stripe -- --deploy
npm run doctor:billing
Operator guide: STRIPE-SETUP.md
API
GET /v1/me → billing.stripeEnabled, canUpgrade
POST /v1/billing/checkout → { url } (admin scope, free plan)
POST /v1/billing/portal → { url } (existing Stripe customer)
GET /v1/upgrade/config → { billing } (public)
POST /v1/upgrade/request → emails a one-time link { email, action: checkout | portal }
POST /v1/upgrade/confirm → { url } (token from the link)
Emails per month count outbound sends and inbound messages. Over the cap the API returns 429 monthly_quota_exceeded.
Dashboard — Upgrade / Manage billing when Stripe is enabled.
Webhook events
checkout.session.completed→teams.plan = procustomer.subscription.updated:activeortrialingkeeps pro, any other status moves to freecustomer.subscription.deleted→ free
Enterprise
Not sold via Stripe checkout yet — contact
hello@webmailagent.com or operator
npm run team:plan -- TEAM_ID enterprise.