Commet
  • Pricing
Log InTry out
Add feature to plan POSTAdd price to plan POSTCreate plan POSTDelete plan price DELETEDelete plan DELETEDelete regional prices DELETEGet plan GETList plans GETRemove feature from plan DELETESet default price PUTSet plan regional pricing PUTSet plan visibility PUTUpdate plan feature PUTUpdate plan price PUTUpdate plan PUTUpsert regional prices PUT
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Update plan price

Update an existing price on a plan.

PUT
/plans/{id}/prices/{priceId}

Update an existing price on a plan.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

id*string
priceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

price?integer
isDefault?boolean
trialDays?integer
includedBalance?|null
includedCredits?|null
introOffer?

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/plans/string/prices/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "data": {    "id": "string",    "planId": "string",    "billingInterval": "weekly",    "price": -9007199254740991,    "isDefault": true,    "trialDays": -9007199254740991,    "includedBalance": -9007199254740991,    "includedCredits": -9007199254740991,    "introOffer": {      "enabled": true,      "discountType": "percentage",      "discountValue": -9007199254740991,      "durationCycles": -9007199254740991    },    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "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"  }}

Update plan feature PUT

Update limits, overage, or enabled status of a feature on a plan.

Update plan PUT

Update a plan's name, description, visibility, or metadata.