Creates a configuration that describes the functionality and behavior of a PortalSession
Parameters
- featuresobjectRequired
Information about the features available in the portal.
- 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.
- 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.
{ "id": "bpc_1MrnZsLkdIwHu7ixNiQL1xPM", "object": "billing_portal.configuration", "active": true, "application": null, "business_profile": { "headline": null, "privacy_policy_url": null, "terms_of_service_url": null }, "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_update": { "default_allowed_updates": [], "enabled": false, "proration_behavior": "none" } }, "is_default": false, "livemode": false, "login_page": { "enabled": false, "url": null }, "metadata": {}, "updated": 1680290736}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.
{ "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_update": { "default_allowed_updates": [], "enabled": false, "proration_behavior": "none" } }, "is_default": false, "livemode": false, "login_page": { "enabled": false, "url": null }, "metadata": {}, "updated": 1688593779}Retrieves a configuration that describes the functionality of the customer portal.
Parameters
No parameters.
Returns
Returns a portal configuration object.
{ "id": "bpc_1MrnZsLkdIwHu7ixNiQL1xPM", "object": "billing_portal.configuration", "active": true, "application": null, "business_profile": { "headline": null, "privacy_policy_url": null, "terms_of_service_url": null }, "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_update": { "default_allowed_updates": [], "enabled": false, "proration_behavior": "none" } }, "is_default": false, "livemode": false, "login_page": { "enabled": false, "url": null }, "metadata": {}, "updated": 1680290736}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
trueto only list active configurations). - is_
defaultboolean Only return the default or non-default configurations (e.g., pass
trueto only list the default configuration).
More parameters
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
Returns a list of portal configuration objects.
{ "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": null, "terms_of_service_url": null }, "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_update": { "default_allowed_updates": [], "enabled": false, "proration_behavior": "none" } }, "is_default": false, "livemode": false, "login_page": { "enabled": false, "url": null }, "metadata": {}, "updated": 1680290736 } ]}