# PostBillingPortalConfigurationsConfiguration

From **Stripe API**.

`POST /v1/billing_portal/configurations/{configuration}`

<p>Updates a configuration that describes the functionality of the customer portal.</p>

## Parameters

### `configuration`

- Location: path
- Required: true
- Type: `string`
- maxLength: `5000`

## Request body

- Required: false
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"properties":{"active":{"description":"Whether the configuration is active and can be used to create portal sessions.","type":"boolean"},"business_profile":{"description":"The business information shown to customers in the portal.","properties":{"headline":{"maxLength":60,"type":"string"},"privacy_policy_url":{"type":"string"},"terms_of_service_url":{"type":"string"}},"title":"business_profile_update_param","type":"object"},"default_return_url":{"anyOf":[{"type":"string"},{"enum":[""],"type":"string"}],"description":"The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session."},"expand":{"description":"Specifies which fields in the response should be expanded.","items":{"maxLength":5000,"type":"string"},"type":"array"},"features":{"description":"Information about the features available in the portal.","properties":{"customer_update":{"properties":{"allowed_updates":{"anyOf":[{"items":{"enum":["address","email","phone","shipping","tax_id"],"type":"string"},"type":"array"},{"enum":[""],"type":"string"}]},"enabled":{"type":"boolean"}},"title":"customer_update_updating_param","type":"object"},"invoice_history":{"properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"title":"invoice_list_param","type":"object"},"payment_method_update":{"properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"title":"payment_method_update_param","type":"object"},"subscription_cancel":{"properties":{"cancellation_reason":{"properties":{"enabled":{"type":"boolean"},"options":{"anyOf":[{"items":{"enum":["customer_service","low_quality","missing_features","other","switched_service","too_complex","too_expensive","unused"],"type":"string"},"type":"array"},{"enum":[""],"type":"string"}]}},"required":["enabled"],"title":"subscription_cancellation_reason_updating_param","type":"object"},"enabled":{"type":"boolean"},"mode":{"enum":["at_period_end","immediately"],"type":"string"},"proration_behavior":{"enum":["always_invoice","create_prorations","none"],"type":"string"}},"title":"subscription_cancel_updating_param","type":"object"},"subscription_pause":{"properties":{"enabled":{"type":"boolean"}},"title":"subscription_pause_param","type":"object"},"subscription_update":{"properties":{"default_allowed_updates":{"anyOf":[{"items":{"enum":["price","promotion_code","quantity"],"type":"string"},"type":"array"},{"enum":[""],"type":"string"}]},"enabled":{"type":"boolean"},"products":{"anyOf":[{"items":{"properties":{"prices":{"items":{"maxLength":5000,"type":"string"},"type":"array"},"product":{"maxLength":5000,"type":"string"}},"required":["prices","product"],"title":"subscription_update_product_param","type":"object"},"type":"array"},{"enum":[""],"type":"string"}]},"proration_behavior":{"enum":["always_invoice","create_prorations","none"],"type":"string"}},"title":"subscription_update_updating_param","type":"object"}},"title":"features_updating_param","type":"object"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"enum":[""],"type":"string"}],"description":"Set of [key-value pairs](https://stripe.com/docs/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`."}},"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

A portal configuration describes the functionality and behavior of a portal session.

```json
{"description":"A portal configuration describes the functionality and behavior of a portal session.","properties":{"active":{"description":"Whether the configuration is active and can be used to create portal sessions.","type":"boolean"},"application":{"description":"ID of the Connect Application that created the configuration.","maxLength":5000,"nullable":true,"type":"string"},"business_profile":{"$ref":"#/components/schemas/portal_business_profile"},"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"default_return_url":{"description":"The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.","maxLength":5000,"nullable":true,"type":"string"},"features":{"$ref":"#/components/schemas/portal_features"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"is_default":{"description":"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.","type":"boolean"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.","nullable":true,"type":"object"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["billing_portal.configuration"],"type":"string"},"updated":{"description":"Time at which the object was last updated. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"}},"required":["active","business_profile","created","features","id","is_default","livemode","object","updated"],"title":"PortalConfiguration","type":"object","x-expandableFields":["business_profile","features"],"x-resourceId":"billing_portal.configuration"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url https://api.stripe.com/v1/billing_portal/configurations/{configuration} \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{
  "active": true,
  "business_profile": {
    "headline": "string",
    "privacy_policy_url": "string",
    "terms_of_service_url": "string"
  },
  "default_return_url": "string",
  "expand": [
    "string"
  ],
  "features": {
    "customer_update": {
      "allowed_updates": "string",
      "enabled": true
    },
    "invoice_history": {
      "enabled": true
    },
    "payment_method_update": {
      "enabled": true
    },
    "subscription_cancel": {
      "cancellation_reason": {
        "enabled": true,
        "options": "string"
      },
      "enabled": true,
      "mode": "string",
      "proration_behavior": "string"
    },
    "subscription_pause": {
      "enabled": true
    },
    "subscription_update": {
      "default_allowed_updates": "string",
      "enabled": true,
      "products": "string",
      "proration_behavior": "string"
    }
  },
  "metadata": "string"
}'
```
