Skip to content

Billing Endpoints ​

GET /api/billing/session ​

Retrieve details of a completed Stripe checkout session.

Parameters ​

NameTypeRequiredDescription
session_idstringYesStripe checkout session ID (cs_...)

Authentication ​

Requires a valid session.

Response ​

Status: 200 OK

json
{
  "session_id": "cs_live_...",
  "amount_total": 3000,
  "currency": "AUD",
  "tier": "pro",
  "created": 1747123456
}

Errors ​

StatusCause
400Missing session_id or payment not completed
401No valid session
500Stripe error retrieving session

GET /api/billing/portal ​

Create a Stripe billing portal session.

Authentication ​

Requires a valid session and an active Stripe customer.

Response ​

Status: 200 OK

json
{
  "url": "https://billing.stripe.com/session/..."
}

Redirect the user to this URL to manage their subscription.