Base URL https://payments.clocknext.com/api/v1
Grants (positive delta) or claws back (negative delta) an outcome balance, named by a step's agentKey. The outcome must be a prepaid (ADVANCE) part of the plan, or the answer is a 422. A claw-back may take the balance below 0. Send an idempotencyKey to make retries safe.
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringCustomer id.
application/json- body
agentKey*stringThe agentKey of one of the outcome's steps. The outcome's own agentKey is not accepted.
1 <= lengthdelta*integerSigned change: positive grants, negative claws back. Non-zero whole number; absolute value ≤ 10,000,000.
notes?stringYour note about the change, up to 200 characters. It is saved with the adjustment.
length <= 200idempotencyKey?stringMakes retries safe: a repeat with the same key adjusts nothing and returns replayed: true.
1 <= length <= 255Outcome balance adjusted.
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 result of the outcome balance change.
curl -X POST 'https://payments.clocknext.com/api/v1/customers/cus_abc123/outcomes/adjust' \ -H 'Content-Type: application/json' \ -d '{ "agentKey": "support_ticket.triage", "delta": 50, "notes": "Migration from legacy ticket bundle"}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Outcome balance adjusted." }, "result": { "adjusted": true, "replayed": false, "remaining": 647, "customerArchived": false }}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
agentKey*stringThe agentKey of one of the outcome's steps. The outcome's own agentKey is not accepted.
1 <= lengthdelta*integerSigned change: positive grants, negative claws back. Non-zero whole number; absolute value ≤ 10,000,000.
notes?stringYour note about the change, up to 200 characters. It is saved with the adjustment.
length <= 200idempotencyKey?stringMakes retries safe: a repeat with the same key adjusts nothing and returns replayed: true.
1 <= length <= 255Outcome balance adjusted.
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 result of the outcome balance change.
curl -X POST 'https://payments.clocknext.com/api/v1/customers/ext/string/outcomes/adjust' \ -H 'Content-Type: application/json' \ -d '{ "agentKey": "contract_review.extract", "delta": 100}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Outcome balance adjusted." }, "result": { "adjusted": true, "replayed": false, "remaining": 2100, "customerArchived": false }}Types
Every object type on this page, with its fields.
OutcomeAdjustInput
| Field | Type | Required | Description |
|---|---|---|---|
agentKey | string | yes | The agentKey of one of the outcome's steps. The outcome's own agentKey is not accepted. |
delta | integer | yes | Signed change: positive grants, negative claws back. Non-zero whole number; absolute value ≤ 10,000,000. |
notes | string | no | Your note about the change, up to 200 characters. It is saved with the adjustment. |
idempotencyKey | string | no | Makes retries safe: a repeat with the same key adjusts nothing and returns replayed: true. |