Base URL https://payments.clocknext.com/api/v1
Updates how much a customer is granted every cycle. Any increase or decrease applies to their balance immediately. agentKey names a credit or a unit by its agentKey, an outcome by the agentKey of one of its steps, and a composite by its refId.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringCustomer id.
application/json- body
kind*stringWhat to change.
"wallet""credit""outcome""unit""composite"agentKey?stringCredit or unit: its agentKey. Outcome: a step's agentKey. Composite: its refId. Not for wallet.
1 <= lengthquantity*numberThe new amount per billing cycle. USD for wallet, a whole number for everything else.
0 <= value <= 10000000Recurring grant 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 recurring grant as it is now.
curl -X PUT 'https://payments.clocknext.com/api/v1/customers/cus_abc123/recurring-grant' \ -H 'Content-Type: application/json' \ -d '{ "kind": "credit", "agentKey": "chat_message", "quantity": 6000}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Recurring grant updated." }, "result": { "updated": true, "kind": "credit", "quantity": 6000 }}Base URL https://payments.clocknext.com/api/v1
The same call, addressed by the customer's externalId. Same body and response.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
externalId*stringYour own id for the customer: 1–64 letters, numbers or "-". Case-sensitive.
^[A-Za-z0-9-]{1,64}$1 <= length <= 64application/json- body
kind*stringWhat to change.
"wallet""credit""outcome""unit""composite"agentKey?stringCredit or unit: its agentKey. Outcome: a step's agentKey. Composite: its refId. Not for wallet.
1 <= lengthquantity*numberThe new amount per billing cycle. USD for wallet, a whole number for everything else.
0 <= value <= 10000000Recurring grant 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 recurring grant as it is now.
curl -X PUT 'https://payments.clocknext.com/api/v1/customers/ext/string/recurring-grant' \ -H 'Content-Type: application/json' \ -d '{ "kind": "credit", "agentKey": "deep_research", "quantity": 6000}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Recurring grant updated." }, "result": { "updated": true, "kind": "credit", "quantity": 6000 }}Types
Every object type on this page, with its fields.
RecurringGrantInput
| Field | Type | Required | Description |
|---|---|---|---|
kind | "wallet" | "credit" | "outcome" | "unit" | "composite" | yes | What to change. |
agentKey | string | no | Credit or unit: its agentKey. Outcome: a step's agentKey. Composite: its refId. Not for wallet. |
quantity | number | yes | The new amount per billing cycle. USD for wallet, a whole number for everything else. |