Skip to main content
POST /api/v1/billing/portal Requires billing.read permission. Creates a Stripe billing portal session where users can update payment methods, view invoices, and manage their subscription. Redirect the user to the returned URL.

Request body

return_url
string
URL to redirect the user to when they exit the billing portal. Must be a valid URI.

Response

url
string
required
Stripe billing portal URL. Redirect the user to this URL.

Errors

StatusWhen
401Missing or invalid Bearer token
403Caller lacks billing.read permission
409No Stripe customer exists for this organization yet. Create a checkout session first.

Example

curl -X POST http://localhost:8080/api/v1/billing/portal \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"return_url": "https://app.example.com/billing"}'
{
  "url": "https://billing.stripe.com/session/bps_test_abc123"
}

Build docs developers (and LLMs) love