ClocknextClocknextHelp
DocumentationAPI ReferenceMCP Tools
Dashboard
What is Clocknext?Getting started

Customers

CustomersCustomer detail

Billing

PurchasesSubscriptionsPackagesInvoicesPaymentsCredit NotesRefunds

Tracking

SignalsRevenue dashboardCustomer Portal

Settings

Profile settingsOrganisation settingsTeam MembersModelsTaxesIntegrationsAPI KeysWebhooks

Documentation

Webhooks

Register endpoints that receive signed notifications when wallets, customers, subscriptions, invoices, payments, credit notes and refunds change.

Webhooks lets your own backend hear about changes as they happen. You register an endpoint — a URL on your side — and pick which events it receives. Clocknext then POSTs a signed JSON message to that URL every time one of those events is triggered, and keeps a log of every delivery attempt so you can see what was sent, what your server answered, and retry anything that failed.

The events are in seven groups:

GroupEvents
Walletwallet.balance.update, wallet.balance.drop
Customercustomer.created, customer.updated, customer.archived, customer.restored
Subscriptionsubscription.created, subscription.activated, subscription.renewed, subscription.on_hold, subscription.resumed, subscription.cancellation_scheduled, subscription.cancelled
Invoiceinvoice.created, invoice.paid, invoice.voided
Paymentpayment.succeeded, payment.failed
Credit notecredit_note.created, credit_note.voided
Refundrefund.created, refund.succeeded, refund.failed

For when each event is triggered, see Events.

Not triggered by usage signals

wallet.balance.update isn't triggered when a usage signal charges the wallet. To read a balance, call Get a customer's balances. wallet.balance.drop is still triggered when a signal takes the balance to the low-balance threshold.

Each event's payload is on its page in the API reference; for the headers and how to verify the signature, see Webhooks.

What you can do here

  • Add an endpoint: a name, a URL, and the events it should receive.
  • Set a threshold for wallet.balance.drop, in USD or as a percentage of the plan's Wallet amount.
  • Copy or reveal an endpoint's signing secret, and rotate it.
  • Edit an endpoint's name, URL, events and threshold.
  • Disable an endpoint temporarily, or delete it.
  • Browse each endpoint's delivery history, view the exact payload sent, and retry a failed delivery.

Owner or admin only

Adding, editing, disabling, deleting, rotating secrets, revealing secrets, and retrying deliveries are available to owners and admins. Members can see the endpoints but not change them.

On this page

Endpoints list

A table of every endpoint in the workspace, one row per endpoint, with its Name and Webhook URL. A Disabled badge marks endpoints that are switched off. Click a row to open its detail page. The ⋯ menu on each row holds:

  • Edit — change the name, URL or events.
  • Disable Endpoint / Enable Endpoint — pause or resume deliveries.
  • Rotate secret — issue a new signing secret.
  • Delete — remove the endpoint.

With no endpoints yet, the page shows an empty state and an Add webhook button.

Add / edit webhook

A dialog with these parts:

  • Name — give it a name.
  • Webhook URL — where to POST events. Must start with http:// or https://.
  • Events — one row per group (Wallet, Customer, Subscription, Invoice, Payment, Credit note, Refund), with how many of its events are ticked (for example 2 of 4). The Credit note and Refund groups start unticked, also on an endpoint that existed before them: tick them to get those events. Open a group to see its events, each with a checkbox and a short description. The checkbox on a group row ticks or clears every event in the group. Pick at least one event. Ticking wallet.balance.drop reveals a Threshold field with a unit dropdown (USD or Percentage (%)). The threshold is required for that event: 0 or more in USD, between 0 and 100 as a percentage.

Endpoint detail (/settings/webhooks/[id])

  • The endpoint's Name, with an edit button and a Disabled badge when it's off. Endpoints created before names existed show "—".
  • A Failing since notice when the most recent deliveries have been failing — it shows when the current run of failures started and disappears after the next successful delivery.
  • Signing Secret — masked as whsec_•••• plus its last four characters. Use the eye button to reveal the full value and the copy button to copy it.
  • Subscribed events — the events this endpoint receives; the threshold is shown next to wallet.balance.drop (e.g. wallet.balance.drop · $50, or wallet.balance.drop · 10% for a percentage).
  • Message Attempts — the delivery history (below).

Message Attempts

One row per delivery attempt, newest first, filterable by All, Success, or Failed, with Load more for older rows.

ColumnShows
TimestampWhen the attempt was made, to the millisecond.
Event TypeThe event name, with · attempt N when this was a retry.
Message IDThe event's evt_… id. It's the same on every retry of one event.
StatusSuccess (your server answered 2xx) or Failed (anything else, or no answer).
ActionRaw data shows the exact JSON body sent. Retry (failed rows only) sends it again.

Adding an endpoint

  1. Press Add webhook.
  2. Give it a Name.
  3. Enter your Webhook URL, e.g. https://your.app/webhooks/clocknext.
  4. Tick the events you want: a whole group, or single events inside an open group. For wallet.balance.drop, enter the Threshold and choose its unit, USD or Percentage (%).
  5. Press Add webhook.
  6. The Your signing secret dialog shows the endpoint's secret (it starts with whsec_). Copy it into your server's configuration — you need it to verify that messages really come from Clocknext. You can also reveal it later from the endpoint's detail page.

How the low-balance threshold works

wallet.balance.drop uses two thresholds, and the customer's own comes first:

  • The customer has their own threshold — set on the customer's Manage tab (see Wallet) or with the API. Only that threshold is used: one event goes to every endpoint subscribed to it, whatever each endpoint's own threshold is.
  • The customer has none — each endpoint uses its own threshold, and each is triggered on its own crossing.

A threshold, a customer's or an endpoint's, is either an amount in USD or a percentage (0 to 100) of the plan's Wallet amount per cycle. On a plan that gives $100 a cycle, a 10% threshold is $10. The event then carries threshold_percentage in place of threshold. A percentage applies to advance-billed wallets only: with arrear billing, or no active plan Wallet amount, a percentage threshold sends nothing.

Either way it is triggered when a single balance change takes the wallet from above the threshold to at or below it, once per drop — not on every charge while the balance stays low, and again only after the balance goes back above the threshold and drops again.

Managing an endpoint

  • Edit — change the name, the URL, the selected events and the threshold. The new event list replaces the old one.
  • Disable Endpoint — stops deliveries. Events that happen while it's disabled are not sent, and are not sent later when you re-enable it. Enable Endpoint resumes deliveries. The Failing since notice goes away once a delivery to the endpoint succeeds.
  • Rotate secret — issues a new secret and shows it in the Your signing secret dialog. Every delivery from that moment on, including retries, is signed with the new secret, so update your server straight away.
  • Delete — after confirming, removes the endpoint and its secret. This can't be undone. Clocknext keeps its delivery history for 90 days.
  • Retry — on a failed row in Message Attempts, sends the same payload (same Message ID) again. The new attempt shows as a new row within half a minute.

Related

  • Webhooks in the API reference — events, payloads, headers, and signature verification.
  • Customer detail — a customer's wallet balance, subscriptions and invoices.
  • API Keys — the key your backend uses to call the Clocknext API.

API Keys

Create, copy, regenerate, and delete the single secret key that authenticates the Clocknext API and SDK for your workspace.

On this page

What you can do hereOn this pageEndpoints listAdd / edit webhookEndpoint detail (/settings/webhooks/[id])Message AttemptsAdding an endpointManaging an endpointRelated