POST
/v1/products/{product}/featuresAttach a feature to a product
Creates a feature attachment for a product. Supply the entitlement feature identifier in entitlement_feature to associate that feature with product. Use expand when you need selected response fields expanded.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
productstringrequired
The unique identifier of the product to attach the feature to. Must be no longer than 5000 characters.
Product feature attachment details. entitlement_feature identifies the feature to attach.
entitlement_featurestringrequired
The ID of the [Feature](https://docs.stripe.com/api/entitlements/feature) object attached to this product.
expandarray<string>optional
Specifies which fields in the response should be expanded.
200Returns the created product feature attachment, including its identifier, object type, livemode state, and attached entitlement feature.
entitlement_featureobjectrequired
A feature represents a monetizable ability or functionality in your system.
Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer.
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`.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
defaultError response.
errorobjectrequired
Error handling
product must be a product identifier no longer than 5000 characters, and entitlement_feature must be provided as a feature identifier no longer than 5000 characters. Each field name supplied in expand must be no longer than 5000 characters.