Moonborn — API
billing
Subscriptions, invoices, payment methods, usage, Stripe portal/checkout
- POST/v1/billing/checkoutCreate a Stripe Checkout session for new subscriptions
- GET/v1/billing/invoicesPaginate the org invoices (newest-first)
- GET/v1/billing/invoices/{id}Fetch an invoice with line items
- GET/v1/billing/invoices/{id}/pdfRedirect to a short-lived Stripe PDF URL for the invoice
- GET/v1/billing/payment_methodsList saved payment methods (Stripe `pm_*` references)
- POST/v1/billing/payment_methodsAttach a payment method already created via Stripe Elements
- DELETE/v1/billing/payment_methods/{id}Detach a payment method (cannot detach the default while a paid subscription is active)
- GET/v1/billing/portalIssue a short-lived Stripe Customer Portal URL
- GET/v1/billing/subscriptionFetch the caller org's active subscription
- POST/v1/billing/subscriptionCreate a paid subscription (or initiate hosted checkout)
- PATCH/v1/billing/subscriptionChange plan tier or billing interval (proration is config-driven)
- DELETE/v1/billing/subscriptionCancel the subscription (immediately or at period end)
- GET/v1/billing/usageSnapshot of metered usage for the current billing period
- GET/v1/billing/usage/historyPaginated history of finalized usage snapshots