- Pricing plans that define which features customers receive with their subscription.
- Subscriptions that determine actual feature access based on their chosen plan.
max_gb and retention_days privileges to control capacity and duration, while an API access feature might have rate_limit and endpoints privileges to control usage restrictions.
1. Understand feature configuration
Before you create a feature, plan these configuration details for your application. Then, use the Create feature API to send the information to PayPal. Feature identification- Name: Choose a human-readable identifier that describes the feature.
- Code: Create a unique identifier you use in API calls. This code must be unique across all features in your account.
- Description: Provide details about what the feature enables or restricts.
- Name: Choose a human-readable identifier that describes the privilege.
- Code: Create a unique identifier for the privilege within the feature.
- Value type: Data type that the privilege accepts when assigned values in entitlements.
2. Create features
You can create features with or without privileges. Theprivileges[] array is optional - you can add privileges later by updating the feature.
Use a valid access token and send a POST request to /v1/commerce/billing/features with all required request parameters.
On successful feature creation, the PayPal server returns the feature details including any privileges you created inline.
Feature without privileges
Create a basic feature without any privileges:Feature with privileges
Create a feature with associated privileges to enable fine-grained control. Basic privileges Use basic privileges when you want to define simple access controls for features.Request body parameters
| Parameter name | Description |
|---|---|
codeRequired, string | Unique identifier for the feature. Must be unique across all features in your account. |
namestring | Human-readable name for the feature. |
descriptionstring | Description of what functionality the feature provides or restricts. |
privileges[]array | Optional array of privilege configurations. Each privilege defines specific access controls within the feature. |
privileges[].codeRequired when privileges[] provided, string | Unique identifier for the privilege within the feature. |
privileges[].namestring | Human-readable name for the privilege. |
privileges[].value_typestring | Data type that this privilege accepts when assigned values in entitlements. Possible values: INTEGER - Numeric limitsBOOLEAN - On/off togglesSELECT - Predefined optionsSTRING - Text values |
privileges[].configRequired for SELECT type, object | Configuration object for SELECT type privileges. Contains select_options array with available choices. |
Response parameters
This section documents only the response parameters relevant for the next step. For the exhaustive list of response parameters, see API reference.
| Parameter name | Description and further action |
|---|---|
codestring | Unique code for the created feature. Use this code in future operations, such as managing the feature. |
privileges[].codestring | Unique code for each privilege within the feature. Use this code in future operations, such as deleting privileges. |
3. Manage features
You can update feature configurations when adding new privileges, modifying existing privilege settings, or changing feature descriptions. To review a feature’s current configuration, call the Get feature details endpoint.| Feature attribute | Updatable | Possible management options | Impact on existing customers |
|---|---|---|---|
| Feature name | Yes | Update feature details - modify display name | No impact - display only |
| Feature description | Yes | Update feature details - modify feature description | No impact - display only |
| Feature privileges | Yes | Update feature details - modify privilege configuration | Affects existing customer entitlements |
| Feature code | No | Feature cannot be modified - unique identifier remains permanent | N/A - cannot be modified |