Billing

Capacitor uses Stripe for subscription billing. Upgrade your tier to unlock more chargers, higher API limits, advanced OCPP commands, and webhook events.

Tiers

TierPriceChargersAPI calls/dayOCPP CommandsWebhooks
Free£0150BasicNo
Starter£29/mo51,000AllYes
Growth£159/mo10010,000AllYes
ScaleCustomUnlimitedUnlimitedAllYes

Free tier includes: register/list/delete chargers, view status, remote start/stop, and list transactions. Upgrade to Starter for full OCPP command access and webhook events.

Create checkout session

POST/api/v1/billing/checkout

Create a Stripe Checkout session to upgrade your tier. Returns a URL to redirect the user to.

Request body
json
{
  "tier": "starter"
}
Response — 200 OK
json
{
  "url": "https://checkout.stripe.com/c/pay/cs_test_..."
}
Valid tiers: starter, growth. This endpoint requires Firebase Auth (portal only). Redirect the user to the returned URL to complete payment.

Customer portal

POST/api/v1/billing/portal

Create a Stripe Customer Portal session. Users can manage their subscription, switch plans, update payment method, cancel, and view invoices.

Response — 200 OK
json
{
  "url": "https://billing.stripe.com/p/session/..."
}

Billing status

GET/api/v1/billing/status

Get the current billing status for your organisation.

Response — 200 OK
json
{
  "tier": "starter",
  "stripeCustomerId": "cus_abc123",
  "hasSubscription": true,
  "currentPeriodEnd": "2026-03-10T00:00:00.000Z"
}

Stripe webhooks

POST/api/v1/billing/stripe-webhook

Receives Stripe webhook events. This is a public endpoint — no authentication required, but the Stripe signature is verified.

Handled events:

EventAction
checkout.session.completedUpgrade tier, sync API keys, send confirmation email
customer.subscription.updatedSync tier on plan change (e.g. Starter → Growth)
customer.subscription.deletedRevert to Free tier, send downgrade email
invoice.payment_failedLog warning, send payment failed email

Cancellation

Subscriptions are cancelled at the end of the current billing period (not immediately). During the remaining period, users retain access to paid features. When the period ends, Stripe fires customer.subscription.deleted and the account reverts to the Free tier.

Payment failures

When a payment fails, Stripe automatically retries over ~3 weeks (dunning). The account is not immediately downgraded. If all retries fail, the subscription is cancelled and the account reverts to Free. A payment failed email is sent to the account owner with a link to update their payment method.