Commet
  • Precios
Iniciar SesiónRegistrarse
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
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Add price to plan

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

POST
/plans/{id}/prices

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

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.

billingInterval*string
price*integer
trialDays?integer
isDefault?boolean
includedBalance?|null
includedCredits?|null
introOffer?

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/plans/string/prices" \  -H "Content-Type: application/json" \  -d '{    "billingInterval": "weekly",    "price": 0  }'
{  "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"  }}

Add feature to plan POST

Attach a feature to a plan with limits, overage, and credits configuration.

Create plan POST

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