Sample - Stripe API
POST/v1/billing_portal/configurations/{configuration}

Update a portal configuration

Updates a customer portal configuration. Supply only the configuration properties you want to change, such as active, features, login_page, name, or default_return_url; use expand to request expanded response fields.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 8 body fields
configurationstringrequired
The unique identifier of the customer portal configuration to update.

Optional customer portal configuration updates.

activebooleanoptional
Whether the configuration is active and can be used to create portal sessions.
business_profileobjectoptional
The business information shown to customers in the portal.
default_return_urlstringoptional
The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overridden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
expandarray<string>optional
Specifies which fields in the response should be expanded.
featuresobjectoptional
Information about the features available in the portal.
login_pageobjectoptional
The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) 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`.
namestringoptional
The name of the configuration.

2 status codes
200Returns the updated customer portal configuration, including its active state, features, business profile, and timestamps.
activebooleanrequired
Whether the configuration is active and can be used to create portal sessions.
applicationstringoptional
ID of the Connect Application that created the configuration.
business_profileobjectrequired
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
default_return_urlstringoptional
The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overridden](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
featuresobjectrequired
idstringrequired
Unique identifier for the object.
is_defaultbooleanrequired
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.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
login_pageobjectrequired
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
namestringoptional
The name of the configuration.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:billing_portal.configuration
updatedintegerrequired
Time at which the object was last updated. Measured in seconds since the Unix epoch.
defaultReturns an error object containing details about the failed request.
errorobjectrequired

Error handling

configuration must be a string no longer than 5000 characters. login_page.enabled must be provided when login_page is supplied, and name must be no longer than 256 characters when set.