v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-015891,4406.1 MB

Create a portal session

Creates a session of the customer portal.

post/v1/billing_portal/sessions

Response

Successful response.

createdinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

customerstring required

The ID of the customer for this session.

customer_accountstring nullable

The ID of the account for this session.

idstring required

Unique identifier for the object.

livemodeboolean required

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

locale'auto' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'en-AU' | 'en-CA' | 'en-GB' | 'en-IE' | 'en-IN' | 'en-NZ' | 'en-SG' | 'es' | 'es-419' | 'et' | 'fi' | 'fil' | 'fr' | 'fr-CA' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'ms' | 'mt' | 'nb' | 'nl' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th' | 'tr' | 'vi' | 'zh' | 'zh-HK' | 'zh-TW' nullable

The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s preferred_locales or browser’s locale is used.

object'billing_portal.session' required

String representing the object's type. Objects of the same type share the same value.

on_behalf_ofstring nullable

The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this on_behalf_of account appear in the portal. For more information, see the docs. Use the Accounts API to modify the on_behalf_of account's branding settings, which the portal displays.

return_urlstring nullable

The URL to redirect customers to when they click on the portal's link to return to your website.

urlstring required

The short-lived URL of the session that gives customers access to the customer portal.