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

Customer Portal

Mint a customer-portal access token POST

Update a customer using customer Id

Base URL https://payments.clocknext.com/api/v1

PATCH
/customers/{id}

Partial update. Any field sent as null clears that optional column; omitted fields are left untouched. An externalId already held by another active customer is a 409.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Path Parameters

id*string

Customer id.

Request Body

application/json
  1. body
  1. body
  2. …

All fields optional; omitted fields are left untouched.

externalId?|

Your own id for the customer: 1–64 letters, numbers or "-". Case-sensitive.

Match^[A-Za-z0-9-]{1,64}$
Length1 <= length <= 64
name?string

The customer's name: 1–120 characters. Spaces at the start and end are removed.

Length1 <= length <= 120
description?|

Your own note about the customer, up to 500 characters. null clears it.

Lengthlength <= 500
email?string

The customer's billing email. Must be a valid email address. Cannot be null.

Formatemail
Lengthlength <= 200
website?|

The customer's website. ClockNext uses it to find the customer's logo. null clears it.

Lengthlength <= 200
phone?|

The customer's phone number, with 7 to 15 digits. +, -, (, ) and spaces are allowed. null clears it.

Lengthlength <= 40
legalName?|

The customer's registered company name. Invoices show it in place of name. null clears it.

Lengthlength <= 200
addressLine1?|

The first line of the billing address. null clears it.

Lengthlength <= 200
city?|

The city of the billing address. null clears it.

Lengthlength <= 100
state?|

The state or region of the billing address. null clears it.

Lengthlength <= 100
country?|

Billing country. Decides which taxes apply to the customer's invoices.

Lengthlength <= 100
pincode?|

The postal code of the billing address. null clears it.

Lengthlength <= 20
taxId?|

The customer's tax id. Invoices show it as "Tax ID". null clears it.

Lengthlength <= 60
currencyCode?string

ISO 4217 code enabled in your workspace. Defaults to the workspace's primary currency.

Length3 <= length <= 3

Response Body

A single customer.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 customer, in customer.

curl -X PATCH 'https://payments.clocknext.com/api/v1/customers/cus_abc123' \  -H 'Content-Type: application/json' \  -d '{  "phone": "+91 80 4567 8900",  "website": "https://fabrikam.in",  "legalName": "Fabrikam Analytics Pvt Ltd",  "addressLine1": "12 MG Road"}'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Request processed successfully."  },  "result": {    "customer": {      "id": "cmvgv9dyg000607ii9z6oghzf",      "externalId": "fabrikam-org",      "slug": "fabrikam-analytics",      "name": "Fabrikam Analytics",      "description": null,      "email": "finance@fabrikam.in",      "website": "https://fabrikam.in",      "phone": "+91 80 4567 8900",      "legalName": "Fabrikam Analytics Pvt Ltd",      "addressLine1": "12 MG Road",      "city": "Bengaluru",      "state": "Karnataka",      "country": "India",      "pincode": "560001",      "taxId": "29ABCDE1234F1Z5",      "currencyCode": "USD",      "createdAt": "2026-10-20T15:57:07.432Z",      "updatedAt": "2026-10-20T16:10:36.856Z"    }  }}

Update a customer using external Id

Base URL https://payments.clocknext.com/api/v1

PATCH
/customers/ext/{externalId}

The same call, addressed by the customer's externalId. Same body and response. Sending a new externalId in the body changes it (or null clears it) — after that, address the customer by the new value.

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Path Parameters

externalId*string

Your own id for the customer: 1–64 letters, numbers or "-". Case-sensitive.

Match^[A-Za-z0-9-]{1,64}$
Length1 <= length <= 64

Request Body

application/json
  1. body
  1. body
  2. …

All fields optional; omitted fields are left untouched.

externalId?|

Your own id for the customer: 1–64 letters, numbers or "-". Case-sensitive.

Match^[A-Za-z0-9-]{1,64}$
Length1 <= length <= 64
name?string

The customer's name: 1–120 characters. Spaces at the start and end are removed.

Length1 <= length <= 120
description?|

Your own note about the customer, up to 500 characters. null clears it.

Lengthlength <= 500
email?string

The customer's billing email. Must be a valid email address. Cannot be null.

Formatemail
Lengthlength <= 200
website?|

The customer's website. ClockNext uses it to find the customer's logo. null clears it.

Lengthlength <= 200
phone?|

The customer's phone number, with 7 to 15 digits. +, -, (, ) and spaces are allowed. null clears it.

Lengthlength <= 40
legalName?|

The customer's registered company name. Invoices show it in place of name. null clears it.

Lengthlength <= 200
addressLine1?|

The first line of the billing address. null clears it.

Lengthlength <= 200
city?|

The city of the billing address. null clears it.

Lengthlength <= 100
state?|

The state or region of the billing address. null clears it.

Lengthlength <= 100
country?|

Billing country. Decides which taxes apply to the customer's invoices.

Lengthlength <= 100
pincode?|

The postal code of the billing address. null clears it.

Lengthlength <= 20
taxId?|

The customer's tax id. Invoices show it as "Tax ID". null clears it.

Lengthlength <= 60
currencyCode?string

ISO 4217 code enabled in your workspace. Defaults to the workspace's primary currency.

Length3 <= length <= 3

Response Body

A single customer.

application/json
  1. response
  1. response
  2. …
statusCode*integer

The 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 customer, in customer.

Example Request
curl -X PATCH 'https://payments.clocknext.com/api/v1/customers/ext/string' \  -H 'Content-Type: application/json' \  -d '{  "legalName": "Tailspin Studios GmbH",  "taxId": "DE123456789",  "addressLine1": "Friedrichstraße 68",  "pincode": "10117"}'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Request processed successfully."  },  "result": {    "customer": {      "id": "cmvgv9ebb000707iipffdxzwj",      "externalId": "tailspin-org",      "slug": "tailspin-studios",      "name": "Tailspin Studios",      "description": null,      "email": "ops@tailspinstudios.de",      "website": null,      "phone": null,      "legalName": "Tailspin Studios GmbH",      "addressLine1": "Friedrichstraße 68",      "city": "Berlin",      "state": null,      "country": "Germany",      "pincode": "10117",      "taxId": "DE123456789",      "currencyCode": "USD",      "createdAt": "2026-10-20T15:57:07.895Z",      "updatedAt": "2026-10-20T16:10:37.361Z"    }  }}

Types

Every object type on this page, with its fields.

CustomerPatchInput

Editable customer profile fields. null clears an optional field; name and email are required and can't be null. recurringTransactionEmail and autoRecurring are ignored: they are organisation settings now.

FieldTypeRequiredDescription
externalIdstring | nullnoYour own id for the customer: 1–64 letters, numbers or "-". Case-sensitive.
namestringnoThe customer's name: 1–120 characters. Spaces at the start and end are removed.
descriptionstring | nullnoYour own note about the customer, up to 500 characters. null clears it.
emailstringnoThe customer's billing email. Must be a valid email address. Cannot be null.
websitestring | nullnoThe customer's website. ClockNext uses it to find the customer's logo. null clears it.
phonestring | nullnoThe customer's phone number, with 7 to 15 digits. +, -, (, ) and spaces are allowed. null clears it.
legalNamestring | nullnoThe customer's registered company name. Invoices show it in place of name. null clears it.
addressLine1string | nullnoThe first line of the billing address. null clears it.
citystring | nullnoThe city of the billing address. null clears it.
statestring | nullnoThe state or region of the billing address. null clears it.
countrystring | nullnoBilling country. Decides which taxes apply to the customer's invoices.
pincodestring | nullnoThe postal code of the billing address. null clears it.
taxIdstring | nullnoThe customer's tax id. Invoices show it as "Tax ID". null clears it.
currencyCodestringnoISO 4217 code enabled in your workspace. Defaults to the workspace's primary currency.

Customer

FieldTypeRequiredDescription
idstringyesThe customer's ClockNext id. Use it in /customers/{id} paths and as customerId in other calls.
externalIdstring | nullnoYour own id for the customer: 1–64 letters, numbers or "-". Case-sensitive.
slugstringyesA short, unique name made from name at creation (lower case, - between words). It never changes.
namestringyesThe customer's name.
descriptionstring | nullnoYour own note about the customer. null when not set.
emailstringnoThe customer's billing email.
websitestring | nullnoThe customer's website. ClockNext uses it to find the customer's logo. null when not set.
phonestring | nullnoThe customer's phone number. null when not set.
legalNamestring | nullnoThe customer's registered company name. Invoices show it in place of name. null when not set.
addressLine1string | nullnoThe first line of the billing address. null when not set.
citystring | nullnoThe city of the billing address. null when not set.
statestring | nullnoThe state or region of the billing address. null when not set.
countrystring | nullnoBilling country. It decides which taxes apply; no country means no tax.
pincodestring | nullnoThe postal code of the billing address. null when not set.
taxIdstring | nullnoThe customer's tax id. Invoices show it as "Tax ID". null when not set.
currencyCodestringyesThe customer's currency (ISO 4217), as a label. Clocknext converts no money: every invoice and charge is USD, and Stripe, Paddle or the customer's bank converts.
createdAtstringyesWhen the customer was created.
updatedAtstringyesWhen the customer was last changed.

Get a customer GET

Previous Page

Delete a customer DELETE

Next Page