# Create a portal configuration

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

## Request

```curl
curl https://api.stripe.com/v1/billing_portal/configurations \
  -u "<<YOUR_SECRET_KEY>>" \
  -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

```json
{
  "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

Returns a portal configuration object.

## Parameters

- [`features`](https://docs.stripe.com/api/customer_portal/configurations/create.md?query=features) (object, required)
  Information about the features available in the portal.

- [`business_profile`](https://docs.stripe.com/api/customer_portal/configurations/create.md?query=business_profile) (object, optional)
  The business information shown to customers in the portal.

- `default_return_url` (string, optional)
  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.md#create_portal_session-return_url) when creating the session.

- [`login_page`](https://docs.stripe.com/api/customer_portal/configurations/create.md?query=login_page) (object, optional)
  The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://docs.stripe.com/billing/subscriptions/integrating-customer-portal.md#share).

- `metadata` (map, optional)
  Set of [key-value pairs](https://docs.stripe.com/api/metadata.md) 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`.

- `name` (string, optional)
  The name of the configuration.

  The maximum length is 256 characters.
