Sample - Stripe API
POST/v1/entitlements/features

Create an entitlement feature

Creates an entitlement feature that you can assign to products and use to represent a monetizable ability or functionality. Supply lookup_key and name, and optionally attach metadata or request expanded response fields.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

4 body fields

Feature details used to create an entitlement feature.

expandarray<string>optional
Specifies which fields in the response should be expanded.
lookup_keystringrequired
A unique key you provide as your own system identifier. This may be up to 80 characters.
metadataobjectoptional
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.
namestringrequired
The feature's name, for your own purpose, not meant to be displayable to the customer.

2 status codes
200Returns the created feature with its active state, identifier, lookup key, metadata, name, livemode, and object type.
activebooleanrequired
Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
idstringrequired
Unique identifier for the object.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
lookup_keystringrequired
A unique key you provide as your own system identifier. This may be up to 80 characters.
metadataobjectrequired
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.
namestringrequired
The feature's name, for your own purpose, not meant to be displayable to the customer.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:entitlements.feature
defaultError response.
errorobjectrequired

Error handling

lookup_key and name are required. Each must be no more than 80 characters, and metadata values must be strings when metadata is supplied.