Add feature to plan
Attach a feature to a plan with limits, overage, and credits configuration.
Attach a feature to a plan with limits, overage, and credits configuration.
Authorization
ApiKeyAuth x-api-key<token>
In: header
Path Parameters
id*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
featureId*string
enabled*boolean
includedAmount*integer
unlimited*boolean
overage*
creditsPerUnit?|null
pricingMode*string
margin?|null
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/plans/string/features" \ -H "Content-Type: application/json" \ -d '{ "featureId": "string", "enabled": true, "includedAmount": 0, "unlimited": false, "overage": { "enabled": false, "unitPrice": 0 }, "pricingMode": "fixed" }'{ "success": true, "data": { "planId": "string", "featureId": "string", "enabled": true, "includedAmount": -9007199254740991, "unlimited": true, "overage": { "enabled": true, "unitPrice": -9007199254740991 }, "creditsPerUnit": -9007199254740991, "pricingMode": "fixed", "margin": -9007199254740991, "object": "plan", "livemode": true }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}