Skip to main content
All billing is scoped to the active team. Amounts are in cents (e.g., 300 = $3.00).

Subscription

Get Subscription

Response: 200 OK
Subscription statuses: active, cancelled, past_due, trialing

Subscribe

Response: 201 Created — returns the subscription object.

Change Plan

Changes take effect immediately. Billing is prorated.

Cancel

Response: 200 OK
Only the team owner can cancel — cancelling ends billing for everyone on the team. A non-owner member gets 403 Forbidden. Every pod on the team must be deleted first. Stopping a pod does not qualify: a stopped pod is still billed at its full plan rate, and only deletion ends the charge. While any pod remains, the call returns 409 Conflict with the pods that are in the way:
Cancelling stops invoicing immediately, so usage already accrued in the current partial period is not invoiced. Nothing else is removed — the team, its invoice history and any remaining credits are untouched. There is no separate “resubscribe” call: creating a pod on a cancelled team starts a new subscription automatically.

Resume

Returns a past_due or suspended subscription to active once every unpaid invoice is settled; it refuses while any remain. It does not reverse a cancellation — a cancelled subscription is gone, and deploying a pod is what starts a new one.

Invoices

List Invoices

Response: 200 OK
Invoice statuses: draft, open, paid, void, uncollectible

List Open Invoices

Just the unpaid ones for the active team. This is what the dashboard’s “you have an unpaid invoice” banner reads, and it’s the cheap way to check whether an account is about to be suspended for non-payment. Returns the same array shape as GET /api/billing/invoices, or [] when nothing is outstanding.

Get Invoice

Returns the full invoice object including line items.

Pay an Invoice

Charges the team’s default payment method for an open invoice immediately, instead of waiting for the next automatic retry. No request body. Response: 200 OK - returns the updated invoice, with status: "paid" on success. On failure: 400 Bad Request
hosted_invoice_url is present only when the charge reached Stripe and failed there. Send the customer to that page when you get it: it handles 3-D Secure, mandates and alternative payment methods that a direct charge cannot. It is absent when the invoice was never chargeable in the first place (already paid, voided, or no Stripe invoice behind it). The invoice must belong to your active team, or the call returns 403.

Payment Methods

List Payment Methods

Response: 200 OK

Add Payment Method

Response: 201 Created — returns the payment method with card details fetched from Stripe.

List Cards on Your Other Teams

Cards already on file for other teams you own, so a new team can reuse one instead of making you re-enter it. Read-only: adding the card to this team is still a POST /api/billing/payment-methods. Response: 200 OK
Teams where you are a member rather than the owner are excluded, as are teams with no cards, so an empty array is the normal answer for most accounts.

Set Default

Remove

Create SetupIntent

Response: 200 OK
Used by the frontend Stripe Elements flow to securely collect card details.

Credits & Upcoming Charges

Get Credits

Credit types: promo, bonus, refund

Preview Upcoming Charges

Pods are billed daily based on their plan. Stopped pods still incur charges — only deleting a pod stops billing.