The Customer Portal Session object
Attributes
- id string Unique identifier for the object.
- object string, value is "billing_portal.session" String representing the object’s type. Objects of the same type share the same value.
- configuration string Expandable The configuration used by this session, describing the features available.
- created timestamp Time at which the object was created. Measured in seconds since the Unix epoch.
- customer string The ID of the customer for this session.
- customer _ account nullable string The ID of the account for this session.
- flow nullable object Information about a specific flow for the customer to go through. See the docs to learn more about using customer portal deep links and flows.
- livemode boolean If the object exists in live mode, the value is
true. If the object exists in test mode, the value isfalse. - locale nullable enum The the related setting language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s
preferred_localesor browser’s locale is used. - on _ behalf _ of nullable string Connect only The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this
on_behalf_ofaccount appear in the portal. For more information, see the docs. Use the Accounts API to modify theon_behalf_ofaccount’s branding settings, which the portal displays. - return _ url nullable string The URL to redirect customers to when they click on the portal’s link to return to your website.
- url string The short-lived URL of the session that gives customers access to the customer portal.
The Customer Portal Session object
Create a portal session
POST / v1 / billing_portal / sessions
Creates a session of the customer portal.
Parameters
- configuration string The ID of an existing configuration to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
- customer string The ID of an existing customer.
- customer _ account string The ID of an existing account.
- flow _ data object Information about a specific flow for the customer to go through. See the docs to learn more about using customer portal deep links and flows.
- locale enum The the related setting language tag of the locale customer portal is displayed in. If blank or auto, the customer’s
preferred_localesor browser’s locale is used. - on _ behalf _ of string Connect only The
on_behalf_ofaccount to use for this session. When specified, only subscriptions and invoices with thison_behalf_ofaccount appear in the portal. For more information, see the docs. Use the Accounts API to modify theon_behalf_ofaccount’s branding settings, which the portal displays. - return _ url string The default URL to redirect customers to when they click on the portal’s link to return to your website.
Returns
Returns a portal session object.
Response
