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

wallet.balance.update POSTwallet.balance.drop POST

Customer Portal

Mint a customer-portal access token POST
Wallet

wallet.balance.drop

Triggered when a customer's Wallet balance falls to or below their low-balance threshold, or the endpoint's threshold if they have none. The level is in USD (threshold) or a percentage of the plan's Wallet amount per cycle (threshold_percentage).

Header Parameters

X-Clocknext-Signature*string

t=<unix seconds>,v1=<hex HMAC-SHA256> — the HMAC of ${t}.${rawBody} keyed with the endpoint's signing secret. See Verify the signature.

X-Clocknext-Event-Id*string

The event's id — the same as id in the body, and the same on every retry.

X-Clocknext-Event-Type*string

The event name — the same as event_type in the body.

Request Body

application/json
  1. body
  1. body
  2. …
id*string

evt_ + 32 hex characters. Unique per event, and the same on every retry of it — use it to skip duplicates.

event_type*string

Always wallet.balance.drop.

triggered_at*string

When the event was triggered (ISO 8601).

Formatdate-time
data*

The details of the drop: the customer, the level that was crossed, and the balance before and after.

Response Body

Answer any 2xx within 5 seconds; the body is ignored. Anything else counts as failed and is retried.

Example Requests
POST/wallet.balance.drop
Request Body
application/json
{  "id": "evt_1c360a0ac5bf7e224e327a809a605ae6",  "event_type": "wallet.balance.drop",  "triggered_at": "2026-10-20T16:56:14.683Z",  "data": {    "customer": {      "id": "cmvgxdc8c001q07jmyy4qkcqd",      "name": "Coho Winery"    },    "threshold": 50,    "previous_balance": 110,    "current_balance": 35,    "currency_code": "usd"  }}
Header Parameters
{  "X-Clocknext-Signature": "t=1791367200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd",  "X-Clocknext-Event-Id": "evt_1c360a0ac5bf7e224e327a809a605ae6",  "X-Clocknext-Event-Type": "wallet.balance.drop"}

Types

Every object type on this page, with its fields.

WalletBalanceDropEvent

FieldTypeRequiredDescription
idstringyesevt_ + 32 hex characters. Unique per event, and the same on every retry of it — use it to skip duplicates.
event_typestringyesAlways wallet.balance.drop.
triggered_atstringyesWhen the event was triggered (ISO 8601).
dataWalletBalanceDropDatayesThe details of the drop: the customer, the level that was crossed, and the balance before and after.

WalletBalanceDropData

The data object of a wallet.balance.drop event: the customer, the threshold that was crossed, and the balance before and after the change. The level is in USD or a percentage, and exactly one of threshold and threshold_percentage is present. When the org has the Reserved Wallet on, reserved_balance is also present.

FieldTypeRequiredDescription
customerWebhookCustomeryesThe customer the event is about.
thresholdnumbernoUSD threshold crossed: the customer's own, else this endpoint's. Once per crossing from above. Present for a USD level, absent for a percentage one.
threshold_percentagenumbernoThe threshold crossed, as a percentage (0 to 100) of the plan's Wallet amount per cycle, as saved: the customer's own, else this endpoint's. Once per crossing from above. Present for a percentage level, absent for a USD one. The balances are still in USD.
previous_balancenumberyesWallet balance before the change, in USD.
current_balancenumberyesWallet balance after the change, in USD. Can be negative.
reserved_balancenumbernoThe Reserved Wallet's live balance (balance less what was consumed), in USD. Present only when the org has the Reserved Wallet on. The threshold is still checked on the main Wallet only (previous_balance, current_balance): the Reserved Wallet is used after the main Wallet runs out, so this value often stays the same from one alert to the next.
currency_codestringyesAlways usd — Wallet balances are held in USD.

WebhookCustomer

The customer the event is about.

FieldTypeRequiredDescription
idstringyesThe customer's Clocknext id.
namestringyesThe customer's name.

wallet.balance.update POST

Triggered when a customer's Wallet balance increases or decreases, except through usage signals.

customer.created POST

Triggered when a customer is added, in the Clocknext UI or through the Public API v1.