POST /v1/billing_portal/sessions

Creates a session of the customer portal.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
on_behalf_of String No

The on_behalf_of account to use for this session. 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.

flow_data Object No

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.

flow_data.subscription_update_confirm Object No
flow_data.subscription_update_confirm.discounts[] Array No
flow_data.subscription_update_confirm.discounts[].promotion_code String No
flow_data.subscription_update_confirm.discounts[].coupon String No
flow_data.subscription_update_confirm.subscription String Yes
flow_data.subscription_update_confirm.items[] Array Yes
flow_data.subscription_update_confirm.items[].id String Yes
flow_data.subscription_update_confirm.items[].price String No
flow_data.subscription_update_confirm.items[].quantity Integer No
flow_data.subscription_update Object No
flow_data.subscription_update.subscription String Yes
flow_data.type String Yes

Possible values:

  • "subscription_cancel"
  • "subscription_update_confirm"
  • "subscription_update"
  • "payment_method_update"
flow_data.after_completion Object No
flow_data.after_completion.hosted_confirmation Object No
flow_data.after_completion.hosted_confirmation.custom_message String No
flow_data.after_completion.type String Yes

Possible values:

  • "hosted_confirmation"
  • "redirect"
  • "portal_homepage"
flow_data.after_completion.redirect Object No
flow_data.after_completion.redirect.return_url String Yes
flow_data.subscription_cancel Object No
flow_data.subscription_cancel.retention Object No
flow_data.subscription_cancel.retention.type String Yes

Possible values:

  • "coupon_offer"
flow_data.subscription_cancel.retention.coupon_offer Object Yes
flow_data.subscription_cancel.retention.coupon_offer.coupon String Yes
flow_data.subscription_cancel.subscription String Yes
customer String Yes

The ID of an existing customer.

expand[] Array No

Specifies which fields in the response should be expanded.

configuration String No

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.

locale String No

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.

Possible values:

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

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.