300 = $3.00).
Subscription
Get Subscription
200 OK
active, cancelled, past_due, trialing
Subscribe
201 Created — returns the subscription object.
Change Plan
Cancel
200 OK
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:
Resume
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
200 OK
draft, open, paid, void, uncollectible, refunded
stripe_invoice_id, hosted_invoice_url and invoice_pdf are omitted when empty. An invoice that
credits covered in full was never sent to Stripe and carries none of them. invoice_pdf can also be
missing on an older invoice until its document is first requested - use
Download an Invoice rather than reading the field directly.
List Open Invoices
GET /api/billing/invoices, or [] when nothing is outstanding.
Get Invoice
Download an Invoice
302 Found - the Location header is the Stripe-hosted PDF. When Stripe has no direct
PDF for the invoice, it is Stripe’s hosted invoice page instead, which offers the download itself.
-L so curl follows the redirect. If you get HTML back instead of a PDF, the invoice fell back
to the hosted page - open the Location URL in a browser.
Pay an Invoice
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
200 OK
Add Payment Method
201 Created — returns the payment method with card details fetched from Stripe.
List Cards on Your Other Teams
POST /api/billing/payment-methods.
Response: 200 OK
Set Default
Remove
Create SetupIntent
200 OK
Credits & Upcoming Charges
Get Credits
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.