Skip to main content
The customer portal API lets a signed-in customer see their own plan, usage, invoices, and credits, and change plans where you allow it. Your backend creates a session. The browser then calls the portal endpoints with that session’s token. For how the pieces fit together, see Customer portal.

Create a session

Call this from your backend with your API key.
Pass the session token to the browser. Don’t pass your API key.

Call portal endpoints

Send the portal token as a Bearer token:
A portal token can only read and act on its own customer. Requests with a token for another customer, or an expired one, are refused.

Endpoints

Show the plan-change preview before the customer confirms a change.