Plans
Plans customers subscribe to. Nothing is deleted — archive instead.
Base URL https://payments.clocknext.com/api/v1
Lists your plans, oldest first. Pass active=true for purchasable ones only.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
active?booleantrue returns only active (purchasable) plans.
Plans.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The workspace's plans.
curl -X GET 'https://payments.clocknext.com/api/v1/plans?active=true'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "plans": [ { "id": "cmvgvg2dn000n08l23x83smgo", "name": "Free", "description": "Try the assistant — 50 chat messages a month", "billingCycle": "FREE", "cost": 0, "priceAdjustment": 0, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:19.019Z", "updatedAt": "2026-10-20T16:02:19.019Z", "useWalletForArrear": false, "entitlements": [ { "id": "cmvgvg2eg000p08l2owyc53u7", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 50, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2eg000q08l2msmc65bu", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv92mk000n08l5jjjxnnul", "targetName": "PDF Export", "quantity": 5, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2eg000r08l2g4cv12h6", "type": "WALLET", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 0, "rollover": false, "compositeId": null } ] }, { "id": "cmvgvg2yq000s08l21gkr472h", "name": "Pro", "description": "For growing teams that run agents every day", "billingCycle": "MONTHLY", "cost": 499, "priceAdjustment": -109.95875, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:19.778Z", "updatedAt": "2026-10-20T16:05:14.888Z", "useWalletForArrear": true, "entitlements": [ { "id": "cmvgvg2z6000w08l20sxmzifo", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 5000, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6000y08l2dymfunf0", "type": "CREDIT", "billingMode": "ARREAR", "creditId": "cmvgvfdp2000708l2vd8r110d", "outcomeId": null, "unitId": null, "targetName": "Code Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6000z08l26gtlwc5t", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 500, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6001008l2yu0jr0o9", "type": "OUTCOME", "billingMode": "ARREAR", "creditId": null, "outcomeId": "cmvgvffxr000c08l28wch48fa", "unitId": null, "targetName": "Contract Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6001108l2xu4vdgij", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv92mk000n08l5jjjxnnul", "targetName": "PDF Export", "quantity": 200, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001208l2nrl08e7n", "type": "UNIT", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": "cmvgv92vf000o08l5qnqm39eo", "targetName": "Voice Minute", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001508l2pjp8nhcw", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 100, "amount": null, "rollover": true, "compositeId": "cmvgvfgqe000f08l219wzyt7v" }, { "id": "cmvgvg2z7001608l2aq4ojb42", "type": "COMPOSITE", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Research Report", "quantity": null, "amount": null, "rollover": false, "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "id": "cmvgvg2z7001708l2j1xe1uhy", "type": "WALLET", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 50, "rollover": true, "compositeId": null } ] }, { "id": "cmvgvg38w001808l2j7k6ykx3", "name": "Growth (6-month)", "description": "Updated 2026-10-20 — plan description", "billingCycle": "SEMI_ANNUAL", "cost": 2400, "priceAdjustment": 936.0225, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:20.144Z", "updatedAt": "2026-10-20T16:05:15.814Z", "useWalletForArrear": false, "entitlements": [ { "id": "cmvgvg396001b08l2lqp5tw57", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 30000, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg396001c08l2mcrgb62f", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 3000, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg396001d08l20t3ypckp", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 600, "amount": null, "rollover": false, "compositeId": "cmvgvfgqe000f08l219wzyt7v" } ] }, { "id": "cmvgvg3iy001e08l2v6t2frb0", "name": "Scale (pay as you go)", "description": "Everything billed in arrears, drawn from a prepaid wallet", "billingCycle": "QUARTERLY", "cost": 1000, "priceAdjustment": 0, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:20.507Z", "updatedAt": "2026-10-20T16:02:20.507Z", "useWalletForArrear": true, "entitlements": [ { "id": "cmvgvg3jl001f08l2ninx3kps", "type": "CREDIT", "billingMode": "ARREAR", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg3jl001h08l2u5gu8knk", "type": "OUTCOME", "billingMode": "ARREAR", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg3jl001i08l27g14unlu", "type": "UNIT", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": "cmvgv9342000p08l59sk1lk51", "targetName": "Web Scrape", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg3jl001k08l2g7t0nklp", "type": "COMPOSITE", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Research Report", "quantity": null, "amount": null, "rollover": false, "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "id": "cmvgvg3jl001l08l2szhtxtxy", "type": "WALLET", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 1000, "rollover": true, "compositeId": null } ] }, { "id": "cmvgvgg51001s08l2gb0zp7wp", "name": "Enterprise", "description": "Annual contract with committed volume", "billingCycle": "YEARLY", "cost": 60000, "priceAdjustment": 25730.7875, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:36.853Z", "updatedAt": "2026-10-20T16:02:36.853Z", "useWalletForArrear": false, "entitlements": [ { "id": "cmvgvgg59001x08l2ibm1j6dx", "type": "FLAT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 24000, "rollover": false, "compositeId": null }, { "id": "cmvgvgg59001y08l2eq3r76in", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 100000, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvgg59002008l2mkkin8sy", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 20000, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvgg5a002208l2ojdmk8aj", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv93fx000007iiew8xnjd8", "targetName": "Seat", "quantity": 120, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvgg5a002308l2wpkfg3aj", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Research Report", "quantity": 50, "amount": null, "rollover": false, "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "id": "cmvgvgg5a002408l25kmk4s4w", "type": "WALLET", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": null, "rollover": false, "compositeId": null } ] } ] }}Base URL https://payments.clocknext.com/api/v1
Creates a plan in your workspace's primary currency.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
application/json- body
A new plan with at least one wallet, credit, outcome, unit or composite line. A FREE plan takes only ADVANCE lines, no FLAT line, no rollover and no cost.
name*stringThe plan's name. Must be unique in the workspace, ignoring case (409 if taken).
1 <= length <= 120description?|Optional note about the plan.
length <= 500billingCycle*BillingCycleHow often the plan renews and bills. A FREE plan takes only ADVANCE lines.
"MONTHLY""QUARTERLY""SEMI_ANNUAL""YEARLY""FREE"useWalletForArrear?booleanPay ARREAR usage from the wallet.
falsecost?numberThe total price per cycle. Leave it out to use the sum of the pay-in-advance lines.
0 <= valueentitlements*array<>The plan's lines. At most one WALLET line and one FLAT line, and each item only once.
1 <= itemsPlan created.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The new plan.
curl -X POST 'https://payments.clocknext.com/api/v1/plans' \ -H 'Content-Type: application/json' \ -d '{ "name": "Pro", "description": "For growing teams that run agents every day", "billingCycle": "MONTHLY", "cost": 499, "useWalletForArrear": true, "entitlements": [ { "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "quantity": 5000, "rollover": true }, { "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfdfz000608l2wsff83hq", "quantity": 200 }, { "type": "CREDIT", "billingMode": "ARREAR", "creditId": "cmvgvfdp2000708l2vd8r110d" }, { "type": "OUTCOME", "billingMode": "ADVANCE", "outcomeId": "cmvgvffng000808l237059in9", "quantity": 500, "rollover": true }, { "type": "OUTCOME", "billingMode": "ARREAR", "outcomeId": "cmvgvffxr000c08l28wch48fa" }, { "type": "UNIT", "billingMode": "ADVANCE", "unitId": "cmvgv92mk000n08l5jjjxnnul", "quantity": 200 }, { "type": "UNIT", "billingMode": "ARREAR", "unitId": "cmvgv92vf000o08l5qnqm39eo" }, { "type": "UNIT", "billingMode": "ARREAR", "unitId": "cmvgv9342000p08l59sk1lk51" }, { "type": "UNIT", "billingMode": "ADVANCE", "unitId": "cmvgv93fx000007iiew8xnjd8", "quantity": 10 }, { "type": "COMPOSITE", "billingMode": "ADVANCE", "compositeId": "cmvgvfgqe000f08l219wzyt7v", "quantity": 100, "rollover": true }, { "type": "COMPOSITE", "billingMode": "ARREAR", "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "type": "WALLET", "billingMode": "ADVANCE", "amount": 50, "rollover": true } ]}'{ "statusCode": 201, "statusDetail": { "status": "SUCCESS", "message": "Plan created." }, "result": { "created": true, "plan": { "id": "cmvgvg2yq000s08l21gkr472h", "name": "Pro", "description": "For growing teams that run agents every day", "billingCycle": "MONTHLY", "cost": 499, "priceAdjustment": -109.95875, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:19.778Z", "updatedAt": "2026-10-20T16:02:19.778Z", "useWalletForArrear": true, "entitlements": [ { "id": "cmvgvg2z6001108l2xu4vdgij", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv92mk000n08l5jjjxnnul", "targetName": "PDF Export", "quantity": 200, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001208l2nrl08e7n", "type": "UNIT", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": "cmvgv92vf000o08l5qnqm39eo", "targetName": "Voice Minute", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6000w08l20sxmzifo", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 5000, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6000y08l2dymfunf0", "type": "CREDIT", "billingMode": "ARREAR", "creditId": "cmvgvfdp2000708l2vd8r110d", "outcomeId": null, "unitId": null, "targetName": "Code Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6000z08l26gtlwc5t", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 500, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6001008l2yu0jr0o9", "type": "OUTCOME", "billingMode": "ARREAR", "creditId": null, "outcomeId": "cmvgvffxr000c08l28wch48fa", "unitId": null, "targetName": "Contract Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001508l2pjp8nhcw", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 100, "amount": null, "rollover": true, "compositeId": "cmvgvfgqe000f08l219wzyt7v" }, { "id": "cmvgvg2z7001608l2aq4ojb42", "type": "COMPOSITE", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Research Report", "quantity": null, "amount": null, "rollover": false, "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "id": "cmvgvg2z7001708l2j1xe1uhy", "type": "WALLET", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 50, "rollover": true, "compositeId": null } ] } }}Base URL https://payments.clocknext.com/api/v1
Updates only the fields you send, for new purchases. entitlements, when sent, is the complete new list. A line keeps its id, matched by id, else by type and item. A new line gets a new id; a line left out is removed. A wrong id is a 400.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringPlan id.
application/json- body
Only sent fields change, for new purchases. A line keeps its id (by id, else type and item). The price stays unless you send cost or really change the lines. useWalletForArrear needs an ADVANCE WALLET line and an ARREAR line.
name?stringA new name. Must be unique in the workspace, ignoring case (409 if taken).
1 <= length <= 120description?|A new note. Send null to clear it.
length <= 500billingCycle?BillingCycleA new billing cycle. A FREE plan takes only ADVANCE lines, no FLAT line and no rollover.
"MONTHLY""QUARTERLY""SEMI_ANNUAL""YEARLY""FREE"useWalletForArrear?booleanWhen true, ARREAR usage is paid from the wallet as it happens.
cost?numberThe total price per cycle. Leave it out to keep the saved price (see UpdatePlanInput under Types).
0 <= valueentitlements?array<>The complete new list of lines. Saved lines that you leave out are removed.
1 <= itemsPlan updated.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The updated plan.
curl -X PATCH 'https://payments.clocknext.com/api/v1/plans/pl_2h6m3' \ -H 'Content-Type: application/json' \ -d '{ "entitlements": [ { "id": "cmvgvg2z6000w08l20sxmzifo", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 5000, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6000x08l2v4thlkto", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfdfz000608l2wsff83hq", "outcomeId": null, "unitId": null, "targetName": "Deep Research", "quantity": 200, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6000y08l2dymfunf0", "type": "CREDIT", "billingMode": "ARREAR", "creditId": "cmvgvfdp2000708l2vd8r110d", "outcomeId": null, "unitId": null, "targetName": "Code Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6000z08l26gtlwc5t", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 500, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6001008l2yu0jr0o9", "type": "OUTCOME", "billingMode": "ARREAR", "creditId": null, "outcomeId": "cmvgvffxr000c08l28wch48fa", "unitId": null, "targetName": "Contract Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6001108l2xu4vdgij", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv92mk000n08l5jjjxnnul", "targetName": "PDF Export", "quantity": 200, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001208l2nrl08e7n", "type": "UNIT", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": "cmvgv92vf000o08l5qnqm39eo", "targetName": "Voice Minute", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001308l2zynl84nc", "type": "UNIT", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": "cmvgv9342000p08l59sk1lk51", "targetName": "Web Scrape", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001408l2b5q1tgzs", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv93fx000007iiew8xnjd8", "targetName": "Seat", "quantity": 10, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001508l2pjp8nhcw", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 100, "amount": null, "rollover": true, "compositeId": "cmvgvfgqe000f08l219wzyt7v" }, { "id": "cmvgvg2z7001608l2aq4ojb42", "type": "COMPOSITE", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Research Report", "quantity": null, "amount": null, "rollover": false, "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "id": "cmvgvg2z7001708l2j1xe1uhy", "type": "WALLET", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 50, "rollover": true, "compositeId": null } ]}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Plan updated." }, "result": { "updated": true, "plan": { "id": "cmvgvg2yq000s08l21gkr472h", "name": "Pro", "description": "For growing teams that run agents every day", "billingCycle": "MONTHLY", "cost": 499, "priceAdjustment": -109.95875, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:19.778Z", "updatedAt": "2026-10-20T16:05:14.888Z", "useWalletForArrear": true, "entitlements": [ { "id": "cmvgvg2z6000w08l20sxmzifo", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 5000, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6000y08l2dymfunf0", "type": "CREDIT", "billingMode": "ARREAR", "creditId": "cmvgvfdp2000708l2vd8r110d", "outcomeId": null, "unitId": null, "targetName": "Code Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6000z08l26gtlwc5t", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 500, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6001008l2yu0jr0o9", "type": "OUTCOME", "billingMode": "ARREAR", "creditId": null, "outcomeId": "cmvgvffxr000c08l28wch48fa", "unitId": null, "targetName": "Contract Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6001108l2xu4vdgij", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv92mk000n08l5jjjxnnul", "targetName": "PDF Export", "quantity": 200, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001208l2nrl08e7n", "type": "UNIT", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": "cmvgv92vf000o08l5qnqm39eo", "targetName": "Voice Minute", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001508l2pjp8nhcw", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 100, "amount": null, "rollover": true, "compositeId": "cmvgvfgqe000f08l219wzyt7v" }, { "id": "cmvgvg2z7001608l2aq4ojb42", "type": "COMPOSITE", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Research Report", "quantity": null, "amount": null, "rollover": false, "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "id": "cmvgvg2z7001708l2j1xe1uhy", "type": "WALLET", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 50, "rollover": true, "compositeId": null } ] } }}Base URL https://payments.clocknext.com/api/v1
Gets one plan.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringPlan id.
The plan.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The plan with this id, in plan.
curl -X GET 'https://payments.clocknext.com/api/v1/plans/pl_2h6m3'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "plan": { "id": "cmvgvg2yq000s08l21gkr472h", "name": "Pro", "description": "For growing teams that run agents every day", "billingCycle": "MONTHLY", "cost": 499, "priceAdjustment": -109.95875, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:19.778Z", "updatedAt": "2026-10-20T16:02:19.778Z", "useWalletForArrear": true, "entitlements": [ { "id": "cmvgvg2z6000w08l20sxmzifo", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 5000, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6000y08l2dymfunf0", "type": "CREDIT", "billingMode": "ARREAR", "creditId": "cmvgvfdp2000708l2vd8r110d", "outcomeId": null, "unitId": null, "targetName": "Code Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6000z08l26gtlwc5t", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 500, "amount": null, "rollover": true, "compositeId": null }, { "id": "cmvgvg2z6001008l2yu0jr0o9", "type": "OUTCOME", "billingMode": "ARREAR", "creditId": null, "outcomeId": "cmvgvffxr000c08l28wch48fa", "unitId": null, "targetName": "Contract Review", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z6001108l2xu4vdgij", "type": "UNIT", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": "cmvgv92mk000n08l5jjjxnnul", "targetName": "PDF Export", "quantity": 200, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001208l2nrl08e7n", "type": "UNIT", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": "cmvgv92vf000o08l5qnqm39eo", "targetName": "Voice Minute", "quantity": null, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg2z7001508l2pjp8nhcw", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 100, "amount": null, "rollover": true, "compositeId": "cmvgvfgqe000f08l219wzyt7v" }, { "id": "cmvgvg2z7001608l2aq4ojb42", "type": "COMPOSITE", "billingMode": "ARREAR", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Research Report", "quantity": null, "amount": null, "rollover": false, "compositeId": "cmvgvfh1e000i08l2oi7oozop" }, { "id": "cmvgvg2z7001708l2j1xe1uhy", "type": "WALLET", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": null, "quantity": null, "amount": 50, "rollover": true, "compositeId": null } ] } }}Base URL https://payments.clocknext.com/api/v1
Archives a plan. Nothing is deleted.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringPlan id.
Plan archived.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The archived plan.
curl -X POST 'https://payments.clocknext.com/api/v1/plans/pl_2h6m3/archive'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Plan archived." }, "result": { "archived": true, "plan": { "id": "cmvgvg38w001808l2j7k6ykx3", "name": "Growth (6-month)", "description": "Updated 2026-10-20 — plan description", "billingCycle": "SEMI_ANNUAL", "cost": 1313.9775, "priceAdjustment": 0, "currencyCode": "USD", "isActive": false, "createdAt": "2026-10-20T16:02:20.144Z", "updatedAt": "2026-10-20T16:05:06.272Z", "useWalletForArrear": false, "entitlements": [ { "id": "cmvgvg396001b08l2lqp5tw57", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 30000, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg396001c08l2mcrgb62f", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 3000, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg396001d08l20t3ypckp", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 600, "amount": null, "rollover": false, "compositeId": "cmvgvfgqe000f08l219wzyt7v" } ] } }}Base URL https://payments.clocknext.com/api/v1
Restores an archived plan.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringPlan id.
Plan unarchived.
application/json- response
statusCode*integerThe HTTP status code of the response, repeated in the body.
statusDetail*The status of the request. status is SUCCESS, and message says what happened.
result*The restored plan.
curl -X POST 'https://payments.clocknext.com/api/v1/plans/pl_2h6m3/unarchive'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Plan restored." }, "result": { "unarchived": true, "plan": { "id": "cmvgvg38w001808l2j7k6ykx3", "name": "Growth (6-month)", "description": "Updated 2026-10-20 — plan description", "billingCycle": "SEMI_ANNUAL", "cost": 1313.9775, "priceAdjustment": 0, "currencyCode": "USD", "isActive": true, "createdAt": "2026-10-20T16:02:20.144Z", "updatedAt": "2026-10-20T16:05:06.945Z", "useWalletForArrear": false, "entitlements": [ { "id": "cmvgvg396001b08l2lqp5tw57", "type": "CREDIT", "billingMode": "ADVANCE", "creditId": "cmvgvfd63000508l2oexbgpzs", "outcomeId": null, "unitId": null, "targetName": "Chat Message", "quantity": 30000, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg396001c08l2mcrgb62f", "type": "OUTCOME", "billingMode": "ADVANCE", "creditId": null, "outcomeId": "cmvgvffng000808l237059in9", "unitId": null, "targetName": "Resolved Support Ticket", "quantity": 3000, "amount": null, "rollover": false, "compositeId": null }, { "id": "cmvgvg396001d08l20t3ypckp", "type": "COMPOSITE", "billingMode": "ADVANCE", "creditId": null, "outcomeId": null, "unitId": null, "targetName": "Voice AI Call", "quantity": 600, "amount": null, "rollover": false, "compositeId": "cmvgvfgqe000f08l219wzyt7v" } ] } }}Types
Every object type on this page, with its fields.
Plan
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The plan's id. |
name | string | yes | The plan's name. Unique in the workspace, ignoring case. |
description | string | null | no | Optional note about the plan. null when not set. |
billingCycle | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "YEARLY" | "FREE" | yes | How often the plan renews and bills. A FREE plan has no price and grants only ADVANCE lines. |
cost | number | yes | The price per cycle: the pay-in-advance lines plus priceAdjustment. 0 on a FREE plan. |
priceAdjustment | number | no | cost minus the sum of the pay-in-advance lines; negative is a discount. Read-only: send cost. |
useWalletForArrear | boolean | no | When true, pay-as-you-go usage is paid from the wallet as it happens, not invoiced at cycle end. |
currencyCode | string | yes | The workspace's primary currency when the plan was created. |
isActive | boolean | yes | Archived plans are false and can't be purchased. |
createdAt | string | yes | When the plan was created. |
updatedAt | string | yes | When the plan was last changed. |
entitlements | PlanEntitlement[] | yes | The plan's lines — what a customer on it is granted or metered for. |
PlanEntitlement
One line of a plan: what a customer on the plan is granted (ADVANCE) or metered for (ARREAR).
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | Stays the same when the plan is updated, until this line is removed. |
type | "WALLET" | "CREDIT" | "OUTCOME" | "UNIT" | "FLAT" | "COMPOSITE" | yes | The component's kind. COMPOSITE sells a composite: set compositeId. |
billingMode | "ADVANCE" | "ARREAR" | yes | ADVANCE: paid at each cycle start; grants quantity or amount. ARREAR: use is billed at cycle end. |
creditId | string | null | no | The id of the credit this line sells, on a CREDIT line. null on every other line. |
outcomeId | string | null | no | The id of the outcome this line sells, on an OUTCOME line. null on every other line. |
unitId | string | null | no | The id of the unit this line sells, on a UNIT line. null on every other line. |
compositeId | string | null | no | The id of the composite this component sells, on a composite component. |
targetName | string | null | no | Name of the credit, outcome, unit or composite this component sells. |
quantity | number | null | no | What an ADVANCE credit, outcome, unit or composite line grants each cycle. null on other lines. |
amount | number | null | no | USD: the top-up per cycle on an ADVANCE WALLET line, or the fee on a FLAT line. null on others. |
rollover | boolean | yes | What is left carries into the next cycle. Only on ADVANCE credit, outcome, composite and wallet lines. |
CreatePlanInput
A new plan with at least one wallet, credit, outcome, unit or composite line. A FREE plan takes only ADVANCE lines, no FLAT line, no rollover and no cost.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | The plan's name. Must be unique in the workspace, ignoring case (409 if taken). |
description | string | null | no | Optional note about the plan. |
billingCycle | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "YEARLY" | "FREE" | yes | How often the plan renews and bills. A FREE plan takes only ADVANCE lines. |
useWalletForArrear | boolean | no | Pay ARREAR usage from the wallet. |
cost | number | no | The total price per cycle. Leave it out to use the sum of the pay-in-advance lines. |
entitlements | PlanEntitlementInput[] | yes | The plan's lines. At most one WALLET line and one FLAT line, and each item only once. |
PlanEntitlementInput
One plan line; set the item id for its type. A value that doesn't fit its type and billingMode is a 400, never dropped. ADVANCE credit, outcome, unit and composite lines need quantity; ADVANCE WALLET and FLAT lines need amount.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | no | Update only. The id of a saved line on this plan, to update that line. Ignored on create. |
type | "WALLET" | "CREDIT" | "OUTCOME" | "UNIT" | "FLAT" | "COMPOSITE" | yes | The component's kind. COMPOSITE sells a composite: set compositeId. |
billingMode | "ADVANCE" | "ARREAR" | yes | ADVANCE: paid at the start of each cycle. ARREAR: use is billed at the end of the cycle. |
creditId | string | null | no | The id of the credit this line sells. Required on a CREDIT line only. |
outcomeId | string | null | no | The id of the outcome this line sells. Required on an OUTCOME line only. |
unitId | string | null | no | The id of the unit this line sells. Required on a UNIT line only. |
compositeId | string | null | no | The id of the composite this line sells. Required on a composite line only. |
quantity | integer | null | no | Granted each cycle. Required on an ADVANCE credit, outcome, unit or composite line (0 is allowed). |
amount | number | null | no | USD amount. Required on an ADVANCE WALLET line (0 is allowed) and on a FLAT line (above 0). |
rollover | boolean | no | Carry leftovers into the next cycle. Only on an ADVANCE credit, outcome, composite or wallet line. |
UpdatePlanInput
Only sent fields change, for new purchases. A line keeps its id (by id, else type and item). The price stays unless you send cost or really change the lines. useWalletForArrear needs an ADVANCE WALLET line and an ARREAR line.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | A new name. Must be unique in the workspace, ignoring case (409 if taken). |
description | string | null | no | A new note. Send null to clear it. |
billingCycle | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "YEARLY" | "FREE" | no | A new billing cycle. A FREE plan takes only ADVANCE lines, no FLAT line and no rollover. |
useWalletForArrear | boolean | no | When true, ARREAR usage is paid from the wallet as it happens. |
cost | number | no | The total price per cycle. Leave it out to keep the saved price (see UpdatePlanInput under Types). |
entitlements | PlanEntitlementInput[] | no | The complete new list of lines. Saved lines that you leave out are removed. |
Remove a member DELETE
Removes a member from the customer. A member already removed answers `200` "Member removed." again and nothing changes. A member id that never existed is a `404` "Member not found."
Packages
Extra entitlements for one price, added to a customer's subscription. A package is always paid in advance. Added as `RECURRING` (the default), it renews with the subscription on its plan's billing cycle until it is removed; added as `ONE_TIME`, it is billed and granted once. It has no billing cycle, billing mode or rollover of its own. It holds credits, outcomes, units, composites and, once at most, wallet money for the customer's Main wallet. Each entitlement must be on the customer's plan as advance (wallet money: an advance wallet). `flatFee` is deprecated: put the fee in the package price. Nothing is deleted — archive instead. Add and remove packages with the [Subscriptions](/docs/api-reference/subscriptions/addSubscriptionPackages) routes. See [Packages](/docs/documentation/packages).