Create a customer portal session
Creates a short-lived customer portal session and returns a signed URL the customer can use to access their billing portal. Sessions are single-use per token and expire after a short TTL.
Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
2026-04-01 A unique string that makes a retried write safe. If you send the same request with the same key within 24 hours, the API returns the stored response and does not run the request again. A 5xx or 429 response is not stored, so a retry with that key runs the request again.
255"ik_a1b2c3d4e5f6"
Body
Settings for the billing details section of the customer portal. When omitted, the organization's defaults apply.
Alternative identifier (external ID) for the customer. Used when customer_id is not provided.
"ext_39003209203023902"
Customer ID the portal session is for. Either customer_id or customer_alias must be provided.
"cust_abc123"
Settings for the invoice list section of the customer portal. When omitted, the organization's defaults apply.
Settings for the plan overview section of the customer portal. When omitted, the organization's defaults apply.
Response
Success
When the session was created
"2026-04-01T10:00:00Z"
Customer ID the session was issued for
"cust_abc123"
When the session URL will expire. After this, the customer must be redirected to a freshly created session.
"2026-04-01T11:00:00Z"
Unique identifier for the session
"a8B3kLmQ"
Hosted customer portal URL
"https://portal.alguna.io/hs/abc123"