Record wallet
Deprecated. Use Record wallet on events.clocknext.com; @clocknext/sdk 0.20 and later already do. Charges one LLM call to the customer's wallet at the model's provider cost. No agentKey, no composite. The wallet may go negative; a signal is never refused for lack of funds.
Deprecated
Base URL https://payments.clocknext.com/api/v1
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
application/json- body
No agentKey and no composite: a wallet call charges money at the model's cost, not a named entitlement.
customerId?stringCustomer id, at most 128 characters. Required unless externalId is sent.
1 <= length <= 128externalId?stringYour own id for the customer, instead of customerId. An unknown id leaves the signal PENDING.
^[A-Za-z0-9-]{1,64}$1 <= length <= 64member?stringThe member's email, up to 254 characters. A new email adds the member; a non-email is a 400.
idempotencyKey?stringOne key is one signal: a repeat within 3 days, on any signal endpoint, returns the first signalId.
1 <= length <= 255usage*The LLM call to price. Required on credit, outcome and wallet signals.
custom?Free-form metadata up to 16 KB (UTF-8), kept as sent. A value that is not an object is a 400.
Accepted; counted after this answer. A repeated idempotencyKey gets the first signalId and replayed: true (details).
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 data of the answer.
curl -X POST 'https://payments.clocknext.com/api/v1/signal/wallet' \ -H 'Content-Type: application/json' \ -d '{ "customerId": "cmvgva5po000c07iir1vtn8vl", "usage": { "model": "gpt-4o", "inputTokens": 600, "outputTokens": 900 }}'{ "statusCode": 202, "statusDetail": { "status": "SUCCESS", "message": "Signal accepted for processing." }, "result": { "queued": true, "signalId": "01a15a83-b62c-70bd-a2b6-64a9b8d9f266", "replayed": false }}Types
Every object type on this page, with its fields.
WalletSignalInput
Name the customer with customerId or externalId: one is required. If both are sent, customerId wins and externalId is ignored. Unknown fields are dropped.
| Field | Type | Required | Description |
|---|---|---|---|
customerId | string | no | Customer id, at most 128 characters. Required unless externalId is sent. |
externalId | ExternalId | no | Your own id for the customer, instead of customerId. An unknown id leaves the signal PENDING. |
member | string | no | The member's email, up to 254 characters. A new email adds the member; a non-email is a 400. |
idempotencyKey | string | no | One key is one signal: a repeat within 3 days, on any signal endpoint, returns the first signalId. |
usage | SignalUsageBlock | yes | The LLM call to price. Required on credit, outcome and wallet signals. |
custom | object | no | Free-form metadata up to 16 KB (UTF-8), kept as sent. A value that is not an object is a 400. |
WalletSignalInput.externalId
The id YOUR product uses for a customer: 1–64 letters, numbers or "-", matched exactly (case-sensitive). Unique among the organisation's active customers — an archived customer's id can be reused.
SignalUsageBlock
The LLM call to price. Required on credit, outcome and wallet signals.
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | Models-page id, any case, e.g. gpt-4o. openai/gpt-4o is via AI/ML API. If archived, it waits as PENDING. |
inputTokens | integer | yes | Prompt tokens. |
outputTokens | integer | yes | Completion tokens. |
cacheTokens | integer | no | Tokens read from the prompt cache. Defaults to 0. |
cacheWriteTokens | integer | no | Tokens written to the prompt cache, priced at the cache-write rate. Defaults to 0. |
Complete outcome POST
Deprecated. Use [Complete outcome](/docs/api-reference/signals/eventsCompleteOutcomeSignal) on `events.clocknext.com`; `@clocknext/sdk` 0.20 and later already do. Closes one outcome run and bills it. Send the outcome's own `agentKey` and the run's `runId`. A composite occurrence still needs [Complete composite](/docs/api-reference/signals/completeCompositeSignal).
Record unit POST
Deprecated. This route on `payments.clocknext.com` still answers, but it will be removed. Call [Record unit](/docs/api-reference/signals/eventsRecordUnitSignal) on `events.clocknext.com` instead. `@clocknext/sdk` 0.20 and later already call it there. Records `quantity` (default 1) discrete units against `agentKey`.