v2

latestOpenAPI 3.0.0raw.githubusercontent.com2026-02-16143114179.4 KB
Plans

Update a plan

Update plan details like name, description, features, or billing interval.

patch/api/plans/{id}

Path parameters

idstring required

Plan ID

Request body

namestring
descriptionstring
billingInterval'HOURLY' | 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'YEARLY'
billingTiming'IN_ADVANCE' | 'IN_ARREARS'

When to charge: IN_ADVANCE or IN_ARREARS

featuresstring[]
isActiveboolean
netPaymentTermsnumber

Net payment terms in days

invoiceGracePeriodDaysnumber

Grace period in days before draft invoices are finalized

progressiveBillingThresholdnumber

Usage cost threshold for progressive billing

Example request

{
  "netPaymentTerms": 30,
  "invoiceGracePeriodDays": 3,
  "progressiveBillingThreshold": 1000
}

Response

Plan updated

idstring required
namestring required
codestring required
descriptionstring
billingInterval'HOURLY' | 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'QUARTERLY' | 'YEARLY' required
featuresstring[]
isActiveboolean required
billingTiming'IN_ADVANCE' | 'IN_ARREARS' required
minimumCommitmentstring

Minimum commitment amount

createdAtstring required
updatedAtstring required

Example response

{
  "id": "clx1234567890",
  "name": "Premium Monthly",
  "code": "premium_monthly",
  "description": "Premium plan with all features",
  "billingInterval": "MONTHLY",
  "features": [
    "Unlimited users",
    "Priority support"
  ],
  "isActive": true,
  "billingTiming": "IN_ARREARS",
  "minimumCommitment": "100.0000",
  "prices": [
    {
      "id": "clx1234567890",
      "planId": "clxplan123",
      "currency": "USD",
      "amount": "49.9900",
      "isActive": true
    }
  ]
}