Open app
Moonborn — API · billing

Issue a short-lived Stripe Customer Portal URL

The Customer Portal is the canonical UI for upgrading, downgrading, updating payment instruments, and downloading invoices. Backed by Stripe — no PCI scope on Persona side.

GET/v1/billing/portalscope · Bearer (API key or session JWT)

Responses

200OK
Body
FieldTypeDescription
urlreqstring
expiresAtreqstring
401Unauthenticated
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
409Org has no Stripe customer record yet
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring

Examples

cURL
curl -X GET https://api.moonborn.co/v1/billing/portal \
  -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';

const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });

const result = await client.billing.createBillingPortalSession();
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.billing.create_billing_portal_session()