Skip to Content
Docs
Customer portal sessions

Create a customer portal session

POST/portal_sessions

Gives one customer a short-lived link to the customer portal: their plans, payment methods, invoices, refund requests and withdrawal, for every engine.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.

Parameters

customer_reference_idstringRequired
return_urlstringRequired

Where the portal's back link sends the customer.

subscriptionstring

Opens the portal on one subscription.

flowstring

Opens the portal on one action for subscription.

One of change_plan, cancel, update_payment_method or withdraw.

localestring

Default: auto

Returns

The portal session. Send the customer to url before expires_at.

idstring
resourcestring
urlstring
return_urlstring
customerstring
customer_reference_idstring
subscriptionstring or null
flowstring or null
expires_atstring
createdstring
test_modeboolean

Errors

400
The request is invalid.
401
The API key is missing or wrong.
403
The key's permissions don't allow this route.
404
No such object in this workspace and environment.
Was this page helpful?