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

Create plan

Create a new plan with optional consumption model, visibility, and plan group assignment.

POST
/plans/manage

Create a new plan with optional consumption model, visibility, and plan group assignment.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

name*string
code*string
description?string
consumptionModel?string
isPublic?boolean
isFree?boolean
blockOnExhaustion?boolean
planGroupId?string
metadata?

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/plans/manage" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "code": "string"  }'
{  "success": true,  "data": {    "id": "string",    "name": "string",    "code": "string",    "description": "string",    "consumptionModel": "metered",    "isPublic": true,    "isDefault": true,    "isFree": true,    "blockOnExhaustion": true,    "sortOrder": -9007199254740991,    "planGroupId": "string",    "metadata": {      "property1": null,      "property2": null    },    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "features": [      {        "code": "string",        "name": "string",        "type": "boolean",        "unitName": "string",        "enabled": true,        "includedAmount": -9007199254740991,        "unlimited": true,        "overage": {          "enabled": true,          "model": "per_unit",          "unitPrice": -9007199254740991        },        "regionalPrices": [          {            "currency": "string",            "overageUnitPrice": -9007199254740991,            "autoSynced": true          }        ]      }    ],    "prices": [      {        "billingInterval": "weekly",        "price": -9007199254740991,        "isDefault": true,        "trialDays": -9007199254740991,        "includedBalance": -9007199254740991,        "includedCredits": -9007199254740991,        "introOffer": {          "enabled": true,          "discountType": "percentage",          "discountValue": -9007199254740991,          "durationCycles": -9007199254740991        },        "regionalPrices": [          {            "currency": "string",            "price": -9007199254740991,            "includedBalance": -9007199254740991,            "autoSynced": true          }        ]      }    ],    "exchangeRates": [      {        "currency": "string",        "exchangeRate": 0      }    ],    "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"  }}

Add price to plan POST

Add a billing interval price to a plan with optional trial days and included balance/credits.

Delete plan price DELETE

Remove a price from a plan.