The Customer portal configuration object

Attributes

  • idstring

    Unique identifier for the object.

  • objectstring

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

  • activeboolean

    Whether the configuration is active and can be used to create portal sessions.

  • applicationnullable stringExpandableConnect only

    ID of the Connect Application that created the configuration.

  • business_profileobject

    The business information shown to customers in the portal.

  • createdtimestamp

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

  • default_return_urlnullable string

    The default URL to redirect customers to when they click on the portal’s link to return to your website. This can be overriden when creating the session.

  • featuresobject

    Information about the features available in the portal.

  • is_defaultboolean

    Whether the configuration is the default. If true, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.

  • livemodeboolean

    Has the value true if the object exists in live mode or the value false if the object exists in test mode.

  • login_pageobject

    The hosted login page for this configuration. Learn more about the portal login page in our integration docs.

  • metadatanullable object

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • updatedtimestamp

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

The Customer portal configuration object
{
"id": "bpc_1MrnZsLkdIwHu7ixNiQL1xPM",
"object": "billing_portal.configuration",
"active": true,
"application": null,
"business_profile": {
"headline": null,
"privacy_policy_url": "https://example.com/privacy",
"terms_of_service_url": "https://example.com/terms"
},
"created": 1680290736,
"default_return_url": null,
"features": {
"customer_update": {
"allowed_updates": [
"email",
"tax_id"
],
"enabled": true
},
"invoice_history": {
"enabled": true
},
"payment_method_update": {
"enabled": false
},
"subscription_cancel": {
"cancellation_reason": {
"enabled": false,
"options": [
"too_expensive",
"missing_features",
"switched_service",
"unused",
"other"
]
},
"enabled": false,
"mode": "at_period_end",
"proration_behavior": "none"
},
"subscription_pause": {
"enabled": false
},
"subscription_update": {
"default_allowed_updates": [],
"enabled": false,
"proration_behavior": "none"
}
},
"is_default": false,
"livemode": false,
"login_page": {
"enabled": false,
"url": null
},
"metadata": {},
"updated": 1680290736
}

Create a portal configuration

Creates a configuration that describes the functionality and behavior of a PortalSession

Parameters

  • business_profileobjectRequired

    The business information shown to customers in the portal.

  • featuresobjectRequired

    Information about the features available in the portal.

  • default_return_urlstring

    The default URL to redirect customers to when they click on the portal’s link to return to your website. This can be overriden when creating the session.

  • login_pageobject

    The hosted login page for this configuration. Learn more about the portal login page in our integration docs.

  • metadataobject

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Returns

Returns a portal configuration object.

POST /v1/billing_portal/configurations
curl https://api.stripe.com/v1/billing_portal/configurations \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
--data-urlencode "business_profile[privacy_policy_url]"="https://example.com/privacy" \
--data-urlencode "business_profile[terms_of_service_url]"="https://example.com/terms" \
-d "features[customer_update][allowed_updates][]"=email \
-d "features[customer_update][allowed_updates][]"=tax_id \
-d "features[customer_update][enabled]"=true \
-d "features[invoice_history][enabled]"=true
Response
{
"id": "bpc_1MrnZsLkdIwHu7ixNiQL1xPM",
"object": "billing_portal.configuration",
"active": true,
"application": null,
"business_profile": {
"headline": null,
"privacy_policy_url": "https://example.com/privacy",
"terms_of_service_url": "https://example.com/terms"
},
"created": 1680290736,
"default_return_url": null,
"features": {
"customer_update": {
"allowed_updates": [
"email",
"tax_id"
],
"enabled": true
},
"invoice_history": {
"enabled": true
},
"payment_method_update": {
"enabled": false
},
"subscription_cancel": {
"cancellation_reason": {
"enabled": false,
"options": [
"too_expensive",
"missing_features",
"switched_service",
"unused",
"other"
]
},
"enabled": false,
"mode": "at_period_end",
"proration_behavior": "none"
},
"subscription_pause": {
"enabled": false
},
"subscription_update": {
"default_allowed_updates": [],
"enabled": false,
"proration_behavior": "none"
}
},
"is_default": false,
"livemode": false,
"login_page": {
"enabled": false,
"url": null
},
"metadata": {},
"updated": 1680290736
}

Update a portal configuration

Updates a configuration that describes the functionality of the customer portal.

Parameters

  • activeboolean

    Whether the configuration is active and can be used to create portal sessions.

  • business_profileobject

    The business information shown to customers in the portal.

  • default_return_urlstring

    The default URL to redirect customers to when they click on the portal’s link to return to your website. This can be overriden when creating the session.

  • featuresobject

    Information about the features available in the portal.

  • login_pageobject

    The hosted login page for this configuration. Learn more about the portal login page in our integration docs.

  • metadataobject

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

Returns

Returns a portal configuration object.

POST /v1/billing_portal/configurations/:id
curl https://api.stripe.com/v1/billing_portal/configurations/bpc_1MrnZsLkdIwHu7ixNiQL1xPM \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
--data-urlencode "business_profile[privacy_policy_url]"="https://example.com/new_privacy_url" \
--data-urlencode "business_profile[terms_of_service_url]"="https://example.com/new_terms_of_service_url"
Response
{
"id": "bpc_1MrnZsLkdIwHu7ixNiQL1xPM",
"object": "billing_portal.configuration",
"active": true,
"application": null,
"business_profile": {
"headline": null,
"privacy_policy_url": "https://example.com/new_privacy_url",
"terms_of_service_url": "https://example.com/new_terms_of_service_url"
},
"created": 1680290736,
"default_return_url": null,
"features": {
"customer_update": {
"allowed_updates": [
"email",
"tax_id"
],
"enabled": true
},
"invoice_history": {
"enabled": true
},
"payment_method_update": {
"enabled": false
},
"subscription_cancel": {
"cancellation_reason": {
"enabled": false,
"options": [
"too_expensive",
"missing_features",
"switched_service",
"unused",
"other"
]
},
"enabled": false,
"mode": "at_period_end",
"proration_behavior": "none"
},
"subscription_pause": {
"enabled": false
},
"subscription_update": {
"default_allowed_updates": [],
"enabled": false,
"proration_behavior": "none"
}
},
"is_default": false,
"livemode": false,
"login_page": {
"enabled": false,
"url": null
},
"metadata": {},
"updated": 1688593779
}

Retrieve a portal configuration

Retrieves a configuration that describes the functionality of the customer portal.

Parameters

No parameters.

Returns

Returns a portal configuration object.

GET /v1/billing_portal/configurations/:id
curl https://api.stripe.com/v1/billing_portal/configurations/bpc_1MrnZsLkdIwHu7ixNiQL1xPM \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:"
Response
{
"id": "bpc_1MrnZsLkdIwHu7ixNiQL1xPM",
"object": "billing_portal.configuration",
"active": true,
"application": null,
"business_profile": {
"headline": null,
"privacy_policy_url": "https://example.com/privacy",
"terms_of_service_url": "https://example.com/terms"
},
"created": 1680290736,
"default_return_url": null,
"features": {
"customer_update": {
"allowed_updates": [
"email",
"tax_id"
],
"enabled": true
},
"invoice_history": {
"enabled": true
},
"payment_method_update": {
"enabled": false
},
"subscription_cancel": {
"cancellation_reason": {
"enabled": false,
"options": [
"too_expensive",
"missing_features",
"switched_service",
"unused",
"other"
]
},
"enabled": false,
"mode": "at_period_end",
"proration_behavior": "none"
},
"subscription_pause": {
"enabled": false
},
"subscription_update": {
"default_allowed_updates": [],
"enabled": false,
"proration_behavior": "none"
}
},
"is_default": false,
"livemode": false,
"login_page": {
"enabled": false,
"url": null
},
"metadata": {},
"updated": 1680290736
}

List portal configurations

Returns a list of configurations that describe the functionality of the customer portal.

Parameters

  • activeboolean

    Only return configurations that are active or inactive (e.g., pass true to only list active configurations).

  • is_defaultboolean

    Only return the default or non-default configurations (e.g., pass true to only list the default configuration).

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

Returns a list of portal configuration objects.

GET /v1/billing_portal/configurations
curl -G https://api.stripe.com/v1/billing_portal/configurations \
-u "sk_test_4eC39Hq...arjtT1zdp7dcsk_test_4eC39HqLyjWDarjtT1zdp7dc:" \
-d limit=3
Response
{
"object": "list",
"url": "/v1/billing_portal/configurations",
"has_more": false,
"data": [
{
"id": "bpc_1MrnZsLkdIwHu7ixNiQL1xPM",
"object": "billing_portal.configuration",
"active": true,
"application": null,
"business_profile": {
"headline": null,
"privacy_policy_url": "https://example.com/privacy",
"terms_of_service_url": "https://example.com/terms"
},
"created": 1680290736,
"default_return_url": null,
"features": {
"customer_update": {
"allowed_updates": [
"email",
"tax_id"
],
"enabled": true
},
"invoice_history": {
"enabled": true
},
"payment_method_update": {
"enabled": false
},
"subscription_cancel": {
"cancellation_reason": {
"enabled": false,
"options": [
"too_expensive",
"missing_features",
"switched_service",
"unused",
"other"
]
},
"enabled": false,
"mode": "at_period_end",
"proration_behavior": "none"
},
"subscription_pause": {
"enabled": false
},
"subscription_update": {
"default_allowed_updates": [],
"enabled": false,
"proration_behavior": "none"
}
},
"is_default": false,
"livemode": false,
"login_page": {
"enabled": false,
"url": null
},
"metadata": {},
"updated": 1680290736
}
{...}
{...}
],
}
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$