Attributes
- idstring
Unique identifier for the object.
- objectstring
String representing the object’s type. Objects of the same type share the same value.
- configurationstringExpandable
The configuration used by this session, describing the features available.
- createdtimestamp
Time at which the object was created. Measured in seconds since the Unix epoch.
- customerstring
The ID of the customer for this session.
- flownullable 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.
- flow.
after_ completionobject Behavior after the flow is completed.
- flow.
after_completion. hosted_ confirmationnullable object Configuration when
after_
.completion. type=hosted_ confirmation - flow.
after_completion. hosted_confirmation. custom_ messagenullable string A custom message to display to the customer after the flow is completed.
- flow.
after_completion. redirectnullable object Configuration when
after_
.completion. type=redirect - flow.
after_completion. redirect. return_ urlstring The URL the customer will be redirected to after the flow is completed.
- flow.
after_completion. typeenum The specified type of behavior after the flow is completed.
Possible enum valueshosted_
confirmation Displays a confirmation message on the hosted surface after the flow is complete
portal_
homepage Redirects to the portal homepage after the flow is complete.
redirect
Redirects the customer to the specified
redirect.
after the flow is complete.return_ url
- flow.
subscription_ cancelnullable object Configuration when
flow.
.type=subscription_ cancel - flow.
subscription_cancel. retentionnullable object Specify a retention strategy to be used in the cancellation flow.
- flow.
subscription_cancel. retention. coupon_ offernullable object Configuration when
retention.
.type=coupon_ offer - flow.
subscription_cancel. retention. coupon_offer. couponstring The ID of the coupon to be offered.
- flow.
subscription_cancel. retention. typeenum Type of retention strategy that will be used.
Possible enum valuescoupon_
offer Offer customers a coupon as a retention strategy.
- flow.
subscription_cancel. subscriptionstring The ID of the subscription to be canceled.
- flow.
subscription_ updatenullable object Configuration when
flow.
.type=subscription_ update - flow.
subscription_update. subscriptionstring The ID of the subscription to be updated.
- flow.
subscription_ update_ confirmnullable object Configuration when
flow.
.type=subscription_ update_ confirm - flow.
subscription_update_confirm. discountsnullable array of objects The coupon or promotion code to apply to this subscription update.
- flow.
subscription_update_confirm. discounts. couponnullable string The ID of the coupon to apply to this subscription update.
- flow.
subscription_update_confirm. discounts. promotion_ codenullable string The ID of a promotion code to apply to this subscription update.
- flow.
subscription_update_confirm. itemsarray of objects The subscription item to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
- flow.
subscription_update_confirm. items. idnullable string The ID of the subscription item to be updated.
- flow.
subscription_update_confirm. items. pricenullable string The price the customer should subscribe to through this flow. The price must also be included in the configuration’s
features.
.subscription_ update. products - flow.
subscription_update_confirm. items. quantitynullable integer Quantity for this item that the customer should subscribe to through this flow.
- flow.
subscription_update_confirm. subscriptionstring The ID of the subscription to be updated.
- flow.
typeenum Type of flow that the customer will go through.
Possible enum valuespayment_
method_ update Customer will be able to add a new payment method. The payment method will be set as the
customer.
.invoice_ settings. default_ payment_ method subscription_
cancel Customer will be able to cancel their subscription.
subscription_
update Customer will be able to select prices to update to based on the configuration’s
features.
.subscription_ update subscription_
update_ confirm Customer will be able to confirm a specified subscription update.
- livemodeboolean
Has the value
true
if the object exists in live mode or the valuefalse
if the object exists in test mode. - localenullable enum
The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s
preferred_
or browser’s locale is used.locales - on_
behalf_ ofnullable stringConnect only The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this
on_
account appear in the portal. For more information, see the docs. Use the Accounts API to modify thebehalf_ of on_
account’s branding settings, which the portal displays.behalf_ of - return_
urlnullable string The URL to redirect customers to when they click on the portal’s link to return to your website.
- urlstring
The short-lived URL of the session that gives customers access to the customer portal.
{ "id": "bps_1MrSjzLkdIwHu7ixex0IvU9b", "object": "billing_portal.session", "configuration": "bpc_1MAhNDLkdIwHu7ixckACO1Jq", "created": 1680210639, "customer": "cus_NciAYcXfLnqBoz", "flow": null, "livemode": false, "locale": null, "on_behalf_of": null, "return_url": "https://example.com/account", "url": "https://billing.stripe.com/p/session/test_YWNjdF8xTTJKVGtMa2RJd0h1N2l4LF9OY2lBYjJXcHY4a2NPck96UjBEbFVYRnU5bjlwVUF50100BUtQs3bl"}