ClocknextClocknextHelp
DocumentationAPI ReferenceMCP Tools
Dashboard

Get started

OverviewQuickstart

Good to know

Response formatHandling errorsPaginating resultsSending data reliablyYour own customer idsWebhooks

API reference

Signals

Record credit POSTRecord outcome POSTComplete outcome POSTRecord wallet POSTRecord unit POSTComplete composite POSTList raw signals GETRetry signals POSTList Customer Usage Log GETLook Up Usage Logs by ID GET

Deprecated

Record credit POSTRecord outcome POSTComplete outcome POSTRecord wallet POSTRecord unit POSTComplete composite POSTList raw signals GETRetry signals POST

Customers

List customers GETCreate a customer POSTGet a customer GETUpdate a customer PATCHDelete a customer DELETEGet a customer's balances GETGet a customer's wallet ledger GETSet a customer's low-balance alert for wallet PUTGet a customer's current plan GETChange a recurring grant PUTUpdate a customer's card POSTGet a customer's invoice balance GETAdjust a customer's invoice balance POST

Deprecated

List Customer Usage Log GETLook Up Usage Logs by ID GET

Manage

Manage a customer's credit balance POSTManage a customer's outcome balance POSTManage a customer's unit balance POSTManage a customer's composite balance POSTManage a customer's wallet balance POST

Members

List a customer's members GETAdd a member POSTUpdate a member PATCHRemove a member DELETE

Plans and Entitlements

PlansPackagesCreditsOutcomesUnitsComposites

Taxes

List taxes GETCreate a tax POSTGet a tax GETUpdate a tax PATCH

Purchases

List purchases GETCreate a purchase POSTGet a purchase GETUpdate a purchase's auto-payment setting PATCHCancel a purchase POST

Checkout

Create a checkout POST

Subscriptions

List subscriptions GETGet a subscription GETCancel a subscription POSTAdd packages to a subscription POSTRemove a package from a subscription POST

Plan changes

List plan changes GETPreview a plan change POSTChange a customer's plan POSTGet a plan change GET

Invoices

List invoices GETGet an invoice GETMint a hosted pay link GETRecord a payment POST

Credit notes

List credit notes GETCreate a credit note POSTGet a credit note GETVoid a credit note POST

Refunds

List refunds GETRefund to the card POSTGet a refund GET

Payments

List payments GETGet a payment GET

Webhooks

Customer Portal

Mint a customer-portal access token POST

Composites

Credits, outcomes and units billed together as one thing. Nothing is deleted — archive instead.

List composites

Base URL https://payments.clocknext.com/api/v1

GET
/composites

Lists your composites. Pass active=true for active ones only.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Query Parameters

active?boolean

true returns only active composites.

Response Body

Composites.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 composites.

Example Request
curl -X GET 'https://payments.clocknext.com/api/v1/composites?active=true'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Request processed successfully."  },  "result": {    "composites": [      {        "id": "cmvgvfh1e000i08l2oi7oozop",        "name": "Research Report",        "refId": "research_report",        "description": "One finished market-research report",        "price": 12,        "isActive": true,        "createdAt": "2026-10-20T16:01:51.362Z",        "updatedAt": "2026-10-20T16:01:51.362Z",        "entitlements": {          "credits": [            {              "id": "cmvgvfdfz000608l2wsff83hq",              "name": "Deep Research",              "agentKey": "deep_research"            }          ],          "outcomes": [            {              "id": "cmvgvffxr000c08l28wch48fa",              "name": "Contract Review",              "agentKey": "contract_review"            }          ],          "units": [            {              "id": "cmvgv92mk000n08l5jjjxnnul",              "name": "PDF Export",              "agentKey": "pdf_export"            }          ]        }      },      {        "id": "cmvgvfgqe000f08l219wzyt7v",        "name": "Voice AI Call",        "refId": "voice_call",        "description": "Updated 2026-10-20 — composite description",        "price": 1.75,        "isActive": true,        "createdAt": "2026-10-20T16:01:50.966Z",        "updatedAt": "2026-10-20T16:05:14.182Z",        "entitlements": {          "credits": [            {              "id": "cmvgvfd63000508l2oexbgpzs",              "name": "Chat Message",              "agentKey": "chat_message"            }          ],          "outcomes": [],          "units": [            {              "id": "cmvgv92vf000o08l5qnqm39eo",              "name": "Voice Minute",              "agentKey": "voice_minute"            }          ]        }      }    ]  }}

Create a composite

Base URL https://payments.clocknext.com/api/v1

POST
/composites

Creates a composite. It bills only once a plan sells it.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Request Body

application/json
  1. body
  1. body
  2. …

A new composite. Keys use letters, digits, ., _ and - (at most 80) and match exactly. A signal sends { "<refId>": "<your id>" }. price is charged only when a plan sells it.

name*string

The composite's name. Must be unique in the workspace (409 if taken).

Length1 <= length <= 80
refId*string

The key your signals send in their composite block. Unique among your composites (409 if taken).

Match^[A-Za-z0-9._-]+$
Length1 <= length <= 80
description?|

Optional note about the composite.

Lengthlength <= 400
price*number

Price in USD for each completed occurrence. You set it. It is not calculated from the wrapped items.

Range0 <= value <= 10000000
entitlements*

At least one id.

Response Body

Composite created.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 composite.

curl -X POST 'https://payments.clocknext.com/api/v1/composites' \  -H 'Content-Type: application/json' \  -d '{  "name": "Research Report",  "refId": "research_report",  "description": "One finished market-research report",  "price": 12,  "entitlements": {    "creditIds": [      "cmvgvfdfz000608l2wsff83hq"    ],    "outcomeIds": [      "cmvgvffxr000c08l28wch48fa"    ],    "unitIds": [      "cmvgv92mk000n08l5jjjxnnul"    ]  }}'
Example Response
{  "statusCode": 201,  "statusDetail": {    "status": "SUCCESS",    "message": "Composite created."  },  "result": {    "created": true,    "composite": {      "id": "cmvgvfh1e000i08l2oi7oozop",      "name": "Research Report",      "refId": "research_report",      "description": "One finished market-research report",      "price": 12,      "isActive": true,      "createdAt": "2026-10-20T16:01:51.362Z",      "updatedAt": "2026-10-20T16:01:51.362Z",      "entitlements": {        "credits": [          {            "id": "cmvgvfdfz000608l2wsff83hq",            "name": "Deep Research",            "agentKey": "deep_research"          }        ],        "outcomes": [          {            "id": "cmvgvffxr000c08l28wch48fa",            "name": "Contract Review",            "agentKey": "contract_review"          }        ],        "units": [          {            "id": "cmvgv92mk000n08l5jjjxnnul",            "name": "PDF Export",            "agentKey": "pdf_export"          }        ]      }    }  }}

Update a composite

Base URL https://payments.clocknext.com/api/v1

PATCH
/composites/{id}

Updates only the fields you send.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Path Parameters

id*string

Composite id.

Request Body

application/json
  1. body
  1. body
  2. …

Only the fields you send change. A new refId applies to signals at once, so update your callers first. With entitlements, a list left out counts as empty.

name?string

A new name. Must be unique in the workspace (409 if taken).

Length1 <= length <= 80
refId?string

A new key for the composite block. Signals must use the new key at once.

Match^[A-Za-z0-9._-]+$
Length1 <= length <= 80
description?|

A new note. Send null to clear it.

Lengthlength <= 400
price?number

A new price in USD for each completed occurrence. Plans already bought keep the price they were bought at.

Range0 <= value <= 10000000
entitlements?

At least one id.

Response Body

Composite updated.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 composite.

Example Request
curl -X PATCH 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9' \  -H 'Content-Type: application/json' \  -d '{  "price": 1.75,  "entitlements": {    "creditIds": [      "cmvgvfd63000508l2oexbgpzs"    ],    "unitIds": [      "cmvgv92vf000o08l5qnqm39eo"    ]  }}'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Composite updated."  },  "result": {    "updated": true,    "composite": {      "id": "cmvgvfgqe000f08l219wzyt7v",      "name": "Voice AI Call",      "refId": "voice_call",      "description": "Updated 2026-10-20 — composite description",      "price": 1.75,      "isActive": true,      "createdAt": "2026-10-20T16:01:50.966Z",      "updatedAt": "2026-10-20T16:05:14.182Z",      "entitlements": {        "credits": [          {            "id": "cmvgvfd63000508l2oexbgpzs",            "name": "Chat Message",            "agentKey": "chat_message"          }        ],        "outcomes": [],        "units": [          {            "id": "cmvgv92vf000o08l5qnqm39eo",            "name": "Voice Minute",            "agentKey": "voice_minute"          }        ]      }    }  }}

Get a composite

Base URL https://payments.clocknext.com/api/v1

GET
/composites/{id}

Gets one composite.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Path Parameters

id*string

Composite id.

Response Body

The composite.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 composite with this id, in composite.

Example Request
curl -X GET 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Request processed successfully."  },  "result": {    "composite": {      "id": "cmvgvfgqe000f08l219wzyt7v",      "name": "Voice AI Call",      "refId": "voice_call",      "description": "One inbound support call handled by the voice agent",      "price": 1.5,      "isActive": true,      "createdAt": "2026-10-20T16:01:50.966Z",      "updatedAt": "2026-10-20T16:01:50.966Z",      "entitlements": {        "credits": [          {            "id": "cmvgvfd63000508l2oexbgpzs",            "name": "Chat Message",            "agentKey": "chat_message"          }        ],        "outcomes": [],        "units": [          {            "id": "cmvgv92vf000o08l5qnqm39eo",            "name": "Voice Minute",            "agentKey": "voice_minute"          }        ]      }    }  }}

Archive a composite

Base URL https://payments.clocknext.com/api/v1

POST
/composites/{id}/archive

Archives a composite. Nothing is deleted.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Path Parameters

id*string

Composite id.

Response Body

Composite archived.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 composite.

Example Request
curl -X POST 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9/archive'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Composite archived."  },  "result": {    "archived": true,    "composite": {      "id": "cmvgvfgqe000f08l219wzyt7v",      "name": "Voice AI Call",      "refId": "voice_call",      "description": "Updated 2026-10-20 — composite description",      "price": 1.5,      "isActive": false,      "createdAt": "2026-10-20T16:01:50.966Z",      "updatedAt": "2026-10-20T16:05:00.840Z",      "entitlements": {        "credits": [          {            "id": "cmvgvfd63000508l2oexbgpzs",            "name": "Chat Message",            "agentKey": "chat_message"          }        ],        "outcomes": [],        "units": [          {            "id": "cmvgv92vf000o08l5qnqm39eo",            "name": "Voice Minute",            "agentKey": "voice_minute"          }        ]      }    }  }}

Unarchive a composite

Base URL https://payments.clocknext.com/api/v1

POST
/composites/{id}/unarchive

Restores an archived composite.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Path Parameters

id*string

Composite id.

Response Body

Composite unarchived.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 composite.

Example Request
curl -X POST 'https://payments.clocknext.com/api/v1/composites/cmp_7d1x9/unarchive'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Composite restored."  },  "result": {    "unarchived": true,    "composite": {      "id": "cmvgvfgqe000f08l219wzyt7v",      "name": "Voice AI Call",      "refId": "voice_call",      "description": "Updated 2026-10-20 — composite description",      "price": 1.5,      "isActive": true,      "createdAt": "2026-10-20T16:01:50.966Z",      "updatedAt": "2026-10-20T16:05:01.667Z",      "entitlements": {        "credits": [          {            "id": "cmvgvfd63000508l2oexbgpzs",            "name": "Chat Message",            "agentKey": "chat_message"          }        ],        "outcomes": [],        "units": [          {            "id": "cmvgv92vf000o08l5qnqm39eo",            "name": "Voice Minute",            "agentKey": "voice_minute"          }        ]      }    }  }}

Types

Every object type on this page, with its fields.

Composite

FieldTypeRequiredDescription
idstringyesThe composite's id.
namestringyesThe composite's name. Unique in the workspace.
refIdstringyesTag your signals send.
descriptionstring | nullyesOptional note about the composite. null when not set.
pricenumberyesUSD per completed occurrence.
isActivebooleanyesfalse once archived; it can't go on a new plan or tag new signals. Read-only: use archive and unarchive.
createdAtstringyesWhen the composite was created.
updatedAtstringyesWhen the composite was last changed.
entitlementsCompositeEntitlementsyesWhat the composite wraps.

CompositeEntitlements

What a composite wraps: the credits, outcomes and units whose signals it charges for. Each list holds the wrapped items with their names and keys.

FieldTypeRequiredDescription
creditsCompositeItem[]yesThe credits this composite wraps.
outcomesCompositeItem[]yesThe outcomes this composite wraps.
unitsCompositeItem[]yesThe units this composite wraps.

CompositeItem

One credit, outcome or unit that a composite wraps.

FieldTypeRequiredDescription
idstringyesThe id of the credit, outcome or unit.
namestringyesThe name of the credit, outcome or unit.
agentKeystringyesThe key a signal for this item names.

CreateCompositeInput

A new composite. Keys use letters, digits, ., _ and - (at most 80) and match exactly. A signal sends { "<refId>": "<your id>" }. price is charged only when a plan sells it.

FieldTypeRequiredDescription
namestringyesThe composite's name. Must be unique in the workspace (409 if taken).
refIdstringyesThe key your signals send in their composite block. Unique among your composites (409 if taken).
descriptionstring | nullnoOptional note about the composite.
pricenumberyesPrice in USD for each completed occurrence. You set it. It is not calculated from the wrapped items.
entitlementsobjectyesAt least one id.

CreateCompositeInput.entitlements

At least one id.

FieldTypeRequiredDescription
creditIdsstring[]noIds of the credits to wrap. Each must be in your workspace and active. Up to 500.
outcomeIdsstring[]noIds of the outcomes to wrap. Each must be in your workspace and active. Up to 500.
unitIdsstring[]noIds of the units to wrap. Each must be in your workspace, active and FLAT-priced. Up to 500.

UpdateCompositeInput

Only the fields you send change. A new refId applies to signals at once, so update your callers first. With entitlements, a list left out counts as empty.

FieldTypeRequiredDescription
namestringnoA new name. Must be unique in the workspace (409 if taken).
refIdstringnoA new key for the composite block. Signals must use the new key at once.
descriptionstring | nullnoA new note. Send null to clear it.
pricenumbernoA new price in USD for each completed occurrence. Plans already bought keep the price they were bought at.
entitlementsobjectnoAt least one id.

UpdateCompositeInput.entitlements

At least one id.

FieldTypeRequiredDescription
creditIdsstring[]noThe complete new list of credit ids. A new credit must be active.
outcomeIdsstring[]noThe complete new list of outcome ids. A new outcome must be active.
unitIdsstring[]noThe complete new list of unit ids. A new unit must be active and FLAT-priced.

Units

Fixed-price events, priced FLAT, SLAB or VOLUME. Nothing is deleted — archive instead.

List taxes GET

Lists your taxes, oldest first. Archived taxes are included; pass `active=true` for only the ones that apply to new invoices.