> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paypal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage features

<div className="m-badge-page-wrapper">
  <Badge stroke color="orange" size="sm">Limited Release</Badge>
</div>

Feature management helps you monitor, update, and delete existing features and their privileges. You can retrieve feature configurations and modify feature settings to define what functionality customers can access in your application.

## List features

Use a <a href="/developer/how-to/api/get-started#2-get-an-access-token" target="_blank" rel="noopener noreferrer">valid access token</a> and make a GET call to the `/v1/commerce/billing/features` endpoint. Include the following query parameters:

| <span style={{textAlign: 'left', display: 'block'}}>Parameter</span>                 | <span style={{textAlign: 'left', display: 'block'}}>Action</span>              |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `page`<br /><span style={{color: '#95a5a6', fontSize: 'smaller'}}>integer</span>     | Set the page number for paginated results. Default is `1`.                     |
| `per_page`<br /><span style={{color: '#95a5a6', fontSize: 'smaller'}}>integer</span> | Set the number of items to return per page. Default is `10`, maximum is `100`. |

<CodeGroup>
  ```shell lines title="Sample request" theme={null}
  curl -X GET 'https://api-m.sandbox.paypal.com/v1/commerce/billing/features?page=1&per_page=10' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <ACCESS-TOKEN>'
  ```

  ```json lines expandable title="Sample response" theme={null}
  {
    "features": [
      {
        "code": "seats",
        "name": "Number of seats",
        "description": "Number of users allowed in the account",
        "privileges": [
          {
            "code": "max",
            "name": "Maximum seats",
            "value_type": "INTEGER"
          },
          {
            "code": "max_admins",
            "name": "Maximum admin users",
            "value_type": "INTEGER"
          }
        ],
        "created_at": "2025-01-28T10:00:00Z"
      },
      {
        "code": "api_access",
        "name": "API Access",
        "description": "Access to REST API endpoints",
        "privileges": [
          {
            "code": "rate_limit",
            "name": "API Rate Limit",
            "value_type": "INTEGER"
          },
          {
            "code": "endpoints",
            "name": "Available Endpoints",
            "value_type": "SELECT",
            "config": {
              "select_options": [
                "basic",
                "standard",
                "premium",
                "all"
              ]
            }
          }
        ],
        "created_at": "2025-01-28T11:00:00Z"
      },
      {
        "code": "sso",
        "name": "Single Sign-On",
        "description": "SSO authentication configuration",
        "privileges": [
          {
            "code": "enabled",
            "name": "SSO Enabled",
            "value_type": "BOOLEAN"
          },
          {
            "code": "provider",
            "name": "SSO Provider",
            "value_type": "SELECT",
            "config": {
              "select_options": [
                "google",
                "okta",
                "azure",
                "saml"
              ]
            }
          }
        ],
        "created_at": "2025-01-28T12:00:00Z"
      }
    ],
    "metadata": {
      "current_page": 1,
      "total_count": 3,
      "total_pages": 1
    }
  }
  ```
</CodeGroup>

A successful call returns a `200 OK` response with a paginated list of all configured features.

## Update feature details

Use a <a href="/developer/how-to/api/get-started#2-get-an-access-token" target="_blank" rel="noopener noreferrer">valid access token</a> and make a PUT call to the `/v1/commerce/billing/features/{feature_code}` endpoint with the modified request parameters such as name, description, and privileges.

**Path parameter**: `feature_code` is the `code` you provided when you <a href="/limited-release/usage-based-billing/set-up-billing-process/create-features" target="_blank" rel="noopener noreferrer">created the feature</a>.

<Note>
  You cannot modify the feature code after creation. You can only update the name, description, and privileges.
</Note>

For information on all parameters, see <a href="/reference/api/rest/features/update-a-feature" target="_blank" rel="noopener noreferrer">API reference</a>.

<CodeGroup>
  ```shell lines expandable title="Sample request" theme={null}
  curl -X PUT 'https://api-m.sandbox.paypal.com/v1/commerce/billing/features/seats' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <ACCESS-TOKEN>' \
  -d '{
    "name": "User Seats",
    "description": "Maximum number of users allowed in the account",
    "privileges": [
      {
        "code": "max",
        "name": "Maximum seats",
        "value_type": "INTEGER"
      },
      {
        "code": "max_admins",
        "name": "Maximum admin users",
        "value_type": "INTEGER"
      },
      {
        "code": "root",
        "name": "Allow root user",
        "value_type": "BOOLEAN"
      },
      {
        "code": "guest_access",
        "name": "Allow guest access",
        "value_type": "BOOLEAN"
      }
    ]
  }'
  ```

  ```json lines expandable title="Sample response" theme={null}
  {
    "code": "seats",
    "name": "User Seats",
    "description": "Maximum number of users allowed in the account",
    "privileges": [
      {
        "code": "max",
        "name": "Maximum seats",
        "value_type": "INTEGER"
      },
      {
        "code": "max_admins",
        "name": "Maximum admin users",
        "value_type": "INTEGER"
      },
      {
        "code": "root",
        "name": "Allow root user",
        "value_type": "BOOLEAN"
      },
      {
        "code": "guest_access",
        "name": "Allow guest access",
        "value_type": "BOOLEAN"
      }
    ],
    "created_at": "2025-01-28T10:00:00Z"
  }
  ```
</CodeGroup>

A successful call returns a `200 OK` response with the updated feature information.

## Delete privilege

Use a <a href="/developer/how-to/api/get-started#2-get-an-access-token" target="_blank" rel="noopener noreferrer">valid access token</a> and make a DELETE call to the `/v1/commerce/billing/features/{feature_code}/privileges/{privilege_code}` endpoint to remove a specific privilege from a feature.

**Path parameters**:

* `feature_code` is the `code` you provided when you <a href="/limited-release/usage-based-billing/set-up-billing-process/create-features" target="_blank" rel="noopener noreferrer">created the feature</a>.
* `privilege_code` is the `code` you provided when you <a href="/limited-release/usage-based-billing/set-up-billing-process/create-features#feature-with-privileges" target="_blank" rel="noopener noreferrer">created the privilege</a>.

<CodeGroup>
  ```shell lines title="Sample request" theme={null}
  curl -X DELETE 'https://api-m.sandbox.paypal.com/v1/commerce/billing/features/seats/privileges/max_admins' \
  -H 'Authorization: Bearer <ACCESS-TOKEN>'
  ```
</CodeGroup>

A successful call returns a `204 No Content` response.

## Delete feature

Use a <a href="/developer/how-to/api/get-started#2-get-an-access-token" target="_blank" rel="noopener noreferrer">valid access token</a> and make a DELETE call to the `/v1/commerce/billing/features/{feature_code}` endpoint to permanently delete a feature.

**Path parameter**: `feature_code` is the `code` you provided when you <a href="/limited-release/usage-based-billing/set-up-billing-process/create-features" target="_blank" rel="noopener noreferrer">created the feature</a>.

<CodeGroup>
  ```shell lines title="Sample request" theme={null}
  curl -X DELETE 'https://api-m.sandbox.paypal.com/v1/commerce/billing/features/seats' \
  -H 'Authorization: Bearer <ACCESS-TOKEN>'
  ```
</CodeGroup>

A successful call returns a `204 No Content` response.
