Plans

Create a new plan

Create a billing plan with a unique code. Optionally include prices for different currencies. Plans can have MONTHLY, QUARTERLY, or YEARLY billing intervals.

post/api/plans

Request body

namestring required
codestring required

Unique plan code (lowercase, underscores)

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

When to charge: IN_ADVANCE (at period start) or IN_ARREARS (at period end). Defaults to IN_ARREARS.

featuresstring[]
netPaymentTermsnumber

Net payment terms in days (overrides org default)

invoiceGracePeriodDaysnumber

Grace period in days before draft invoices are finalized

progressiveBillingThresholdnumber

Usage cost threshold for mid-cycle progressive billing invoices

Example request

{
  "name": "Premium Monthly",
  "code": "premium_monthly",
  "description": "Premium plan with all features",
  "billingInterval": "MONTHLY",
  "billingTiming": "IN_ARREARS",
  "features": [
    "Unlimited users",
    "Priority support"
  ],
  "prices": [
    {
      "currency": "NGN",
      "amount": 9999.99
    }
  ],
  "netPaymentTerms": 30,
  "invoiceGracePeriodDays": 3,
  "progressiveBillingThreshold": 1000
}

Response

Plan created

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
    }
  ]
}

Changes

Changed in 1 of the 2 revisions of this API.8

    • added the new optional request property billingTiming

      new-optional-request-property

    • added the new optional request property invoiceGracePeriodDays

      new-optional-request-property

    • added the new optional request property netPaymentTerms

      new-optional-request-property

    • added the new optional request property progressiveBillingThreshold

      new-optional-request-property

    • added the new DAILY enum value to the request property billingInterval

      request-property-enum-value-added

    • added the new HOURLY enum value to the request property billingInterval

      request-property-enum-value-added

    • added the new WEEKLY enum value to the request property billingInterval

      request-property-enum-value-added

    • added the media type application/json for the response with the status 201

      response-media-type-added