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

List invoices

Newest first, paged with limit (at most 50) and cursor → nextCursor — see Paginating results. Any other query parameter is a 400 ("Unknown parameter offset.").

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

GET
/invoices

Authorization

apiKey
headerAuthorizationBearer <cnk_…>

Organisation-scoped key from Settings → API Keys.

Query Parameters

customerId?string

Restrict results to this customer.

status?string

Filter by invoice status (case-insensitive).

Value in"OPEN""PAID""VOID""AUTO_CLOSED"
limit?integer

Rows on one page: default 50, maximum 50 (a bigger value is cut to 50). Zero, a negative number or a non-number is a 400.

Range1 <= value <= 50
Default50
cursor?string

Id to page after — the last id of the previous page.

Response Body

Invoices.

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*

One page of invoices.

Example Request
curl -X GET 'https://payments.clocknext.com/api/v1/invoices?customerId=cus_abc123&status=OPEN&limit=50&cursor=cus_zzz789'
Example Response
{  "statusCode": 200,  "statusDetail": {    "status": "SUCCESS",    "message": "Request processed successfully."  },  "result": {    "invoices": [      {        "id": "cmvgvkpvy004m08l2iy0qdnc6",        "invoiceNumber": "INV-0005",        "purchaseNumber": "PUR-006",        "purchaseId": "cmvgvkptw004i08l2d8vveucu",        "customerId": "cmvgv9650000407iigjb3lt2p",        "customerName": "Adventure Works",        "planName": "Growth (6-month)",        "billingCycle": "SEMI_ANNUAL",        "cycleIndex": 0,        "stream": "ADVANCE",        "usageCycleIndex": null,        "packageInvoice": null,        "noteType": "NEW_PURCHASE",        "note": "New Purchase",        "amount": 2400,        "creditedUsd": 0,        "balanceAppliedUsd": 0,        "amountDueUsd": 2400,        "currencyCode": "USD",        "status": "OPEN",        "paymentMode": null,        "paidWith": [],        "issuedAt": "2026-11-03T00:00:00.000Z",        "paidAt": null,        "invoicePdfUrl": "https://payments.clocknext.com/api/documents/aW52b2ljZTppbnZfamtsMDEy.Qm9xV0x3c1N0a3B6bU1YdWNfR1J0dDBRZ1lQdmRqR3o",        "receiptPdfUrl": null      },      {        "id": "cmvgvksjw005u08l2au4yt03r",        "invoiceNumber": "INV-0008",        "purchaseNumber": "PUR-009",        "purchaseId": "cmvgvksil005p08l2ggbacq1l",        "customerId": "cmvgva5po000c07iir1vtn8vl",        "customerName": "Northwind Traders",        "planName": "Starter",        "billingCycle": "MONTHLY",        "cycleIndex": 0,        "stream": "ADVANCE",        "usageCycleIndex": null,        "packageInvoice": null,        "noteType": "NEW_PURCHASE",        "note": "New Purchase",        "amount": 31.1,        "creditedUsd": 0,        "balanceAppliedUsd": 0,        "amountDueUsd": 0,        "currencyCode": "USD",        "status": "VOID",        "paymentMode": null,        "paidWith": [],        "issuedAt": "2026-10-20T00:00:00.000Z",        "paidAt": null,        "invoicePdfUrl": "https://payments.clocknext.com/api/documents/aW52b2ljZTppbnZfamtsMDEy.Qm9xV0x3c1N0a3B6bU1YdWNfR1J0dDBRZ1lQdmRqR3o",        "receiptPdfUrl": null      },      {        "id": "cmvgvkqb2004w08l208oh6j1e",        "invoiceNumber": "INV-0006",        "purchaseNumber": "PUR-007",        "purchaseId": "cmvgvkq9x004r08l28dpahwhv",        "customerId": "cmvgvklx5002f08l2875y93k8",        "customerName": "Litware Inc",        "planName": "Starter",        "billingCycle": "MONTHLY",        "cycleIndex": 0,        "stream": "ADVANCE",        "usageCycleIndex": null,        "packageInvoice": null,        "noteType": "NEW_PURCHASE",        "note": "New Purchase",        "amount": 31.1,        "creditedUsd": 0,        "balanceAppliedUsd": 0,        "amountDueUsd": 0,        "currencyCode": "USD",        "status": "PAID",        "paymentMode": "CARD",        "paidWith": [          "CARD"        ],        "issuedAt": "2026-10-20T00:00:00.000Z",        "paidAt": "2026-10-20T16:06:37.930Z",        "invoicePdfUrl": "https://payments.clocknext.com/api/documents/aW52b2ljZTppbnZfamtsMDEy.Qm9xV0x3c1N0a3B6bU1YdWNfR1J0dDBRZ1lQdmRqR3o",        "receiptPdfUrl": "https://payments.clocknext.com/api/documents/cmVjZWlwdDppbnZfamtsMDEy.UjVrUXlCbmZ0VkRwYm1oV2NfbE5xN3dZcThPZ0pkS2E"      },      {        "id": "cmvgvkort004308l2namjqdqp",        "invoiceNumber": "INV-0004",        "purchaseNumber": "PUR-004",        "purchaseId": "cmvgvkoqe003y08l2keaexn1n",        "customerId": "cmvgv9ebb000707iipffdxzwj",        "customerName": "Tailspin Studios",        "planName": "Starter",        "billingCycle": "MONTHLY",        "cycleIndex": 0,        "stream": "ADVANCE",        "usageCycleIndex": null,        "packageInvoice": null,        "noteType": "NEW_PURCHASE",        "note": "New Purchase",        "amount": 34.51,        "creditedUsd": 0,        "balanceAppliedUsd": 0,        "amountDueUsd": 0,        "currencyCode": "USD",        "status": "PAID",        "paymentMode": "SEPA",        "paidWith": [          "SEPA"        ],        "issuedAt": "2026-10-20T00:00:00.000Z",        "paidAt": "2026-10-20T16:06:37.317Z",        "invoicePdfUrl": "https://payments.clocknext.com/api/documents/aW52b2ljZTppbnZfamtsMDEy.Qm9xV0x3c1N0a3B6bU1YdWNfR1J0dDBRZ1lQdmRqR3o",        "receiptPdfUrl": "https://payments.clocknext.com/api/documents/cmVjZWlwdDppbnZfamtsMDEy.UjVrUXlCbmZ0VkRwYm1oV2NfbE5xN3dZcThPZ0pkS2E"      },      {        "id": "cmvgvkob7003v08l21w1in072",        "invoiceNumber": "INV-0003",        "purchaseNumber": "PUR-003",        "purchaseId": "cmvgvko9x003n08l2m19o4vgs",        "customerId": "cmvgv9dyg000607ii9z6oghzf",        "customerName": "Fabrikam Analytics",        "planName": "Scale (pay as you go)",        "billingCycle": "QUARTERLY",        "cycleIndex": 0,        "stream": "ADVANCE",        "usageCycleIndex": null,        "packageInvoice": null,        "noteType": "NEW_PURCHASE",        "note": "New Purchase",        "amount": 1180,        "creditedUsd": 0,        "balanceAppliedUsd": 0,        "amountDueUsd": 0,        "currencyCode": "USD",        "status": "PAID",        "paymentMode": "UPI",        "paidWith": [          "UPI"        ],        "issuedAt": "2026-10-20T00:00:00.000Z",        "paidAt": "2026-10-20T16:06:36.779Z",        "invoicePdfUrl": "https://payments.clocknext.com/api/documents/aW52b2ljZTppbnZfamtsMDEy.Qm9xV0x3c1N0a3B6bU1YdWNfR1J0dDBRZ1lQdmRqR3o",        "receiptPdfUrl": "https://payments.clocknext.com/api/documents/cmVjZWlwdDppbnZfamtsMDEy.UjVrUXlCbmZ0VkRwYm1oV2NfbE5xN3dZcThPZ0pkS2E"      },      {        "id": "cmvgvknob003d08l2sc3jhm55",        "invoiceNumber": "INV-0002",        "purchaseNumber": "PUR-002",        "purchaseId": "cmvgvknlz003408l21rnqtsl2",        "customerId": "cmvgv9th0000a07iisl2s8u6q",        "customerName": "Contoso Pharmaceuticals",        "planName": "Enterprise",        "billingCycle": "YEARLY",        "cycleIndex": 0,        "stream": "ADVANCE",        "usageCycleIndex": null,        "packageInvoice": null,        "noteType": "NEW_PURCHASE",        "note": "New Purchase",        "amount": 60000,        "creditedUsd": 0,        "balanceAppliedUsd": 0,        "amountDueUsd": 0,        "currencyCode": "USD",        "status": "PAID",        "paymentMode": "WIRE_TRANSFER",        "paidWith": [          "WIRE_TRANSFER"        ],        "issuedAt": "2026-10-20T00:00:00.000Z",        "paidAt": "2026-10-20T16:06:36.125Z",        "invoicePdfUrl": "https://payments.clocknext.com/api/documents/aW52b2ljZTppbnZfamtsMDEy.Qm9xV0x3c1N0a3B6bU1YdWNfR1J0dDBRZ1lQdmRqR3o",        "receiptPdfUrl": "https://payments.clocknext.com/api/documents/cmVjZWlwdDppbnZfamtsMDEy.UjVrUXlCbmZ0VkRwYm1oV2NfbE5xN3dZcThPZ0pkS2E"      },      {        "id": "cmvgvkn14002u08l2ct47s2a7",        "invoiceNumber": "INV-0001",        "purchaseNumber": "PUR-001",        "purchaseId": "cmvgvkmxz002h08l2h2i1dnsr",        "customerId": "cmvgva5po000c07iir1vtn8vl",        "customerName": "Northwind Traders",        "planName": "Pro",        "billingCycle": "MONTHLY",        "cycleIndex": 0,        "stream": "ADVANCE",        "usageCycleIndex": null,        "packageInvoice": null,        "noteType": "NEW_PURCHASE",        "note": "New Purchase",        "amount": 535.18,        "creditedUsd": 0,        "balanceAppliedUsd": 0,        "amountDueUsd": 0,        "currencyCode": "USD",        "status": "PAID",        "paymentMode": "ACH",        "paidWith": [          "ACH"        ],        "issuedAt": "2026-10-20T00:00:00.000Z",        "paidAt": "2026-10-20T16:06:35.286Z",        "invoicePdfUrl": "https://payments.clocknext.com/api/documents/aW52b2ljZTppbnZfamtsMDEy.Qm9xV0x3c1N0a3B6bU1YdWNfR1J0dDBRZ1lQdmRqR3o",        "receiptPdfUrl": "https://payments.clocknext.com/api/documents/cmVjZWlwdDppbnZfamtsMDEy.UjVrUXlCbmZ0VkRwYm1oV2NfbE5xN3dZcThPZ0pkS2E"      }    ],    "nextCursor": null  }}

Types

Every object type on this page, with its fields.

InvoiceListRow

FieldTypeRequiredDescription
idstringyesThe invoice's id.
invoiceNumberstringyesThe workspace's reference for the invoice, such as INV-0042.
purchaseNumberstring | nullnoThe reference of the purchase that raised it. null without one, or when it was deleted.
purchaseIdstring | nullnoThe id of the purchase that raised it. null without one, or when it was deleted.
customerIdstringyesThe id of the customer the invoice is for.
customerNamestringyesThe customer's name.
planNamestringyesThe plan's name, saved on the invoice when it was issued.
billingCycle"MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "YEARLY" | "FREE"yesThe plan's billing cycle, saved on the invoice when it was issued.
cycleIndexintegeryesThe billing cycle the invoice belongs to, counted from 0. 0 is the purchase's first cycle.
stream"ADVANCE" | "ARREAR"yesADVANCE: the plan's price for a cycle, billed at its start. ARREAR: the usage of a cycle, billed after it.
usageCycleIndexinteger | nullyesOn a combined invoice: the index of the cycle whose usage it also bills (cycleIndex - 1). Else null.
packageInvoicePackageInvoiceInfo | nullyesSet only on a package attach invoice: the packages it bills. Else null.
noteType"NEW_PURCHASE" | "RENEWAL" | "MANUAL"noNEW_PURCHASE: a purchase's first invoice. RENEWAL: a later one, or a package attach. MANUAL: none.
note"New Purchase" | "Subscription Renewal" | "Manual Invoice"noThe label of noteType, as the app shows it.
amountnumberyesTotal due in USD, tax included.
creditedUsdnumbernoUSD taken off by credit notes, tax included.
balanceAppliedUsdnumbernoUSD of it that the customer's invoice balance paid.
amountDueUsdnumbernoUSD still owed: the amount less credit notes and the balance. 0 unless OPEN.
currencyCodestringyesUSD for every invoice issued since Clocknext stopped converting money (every invoice and charge is USD). An older invoice keeps the customer's currency it was issued with.
status"OPEN" | "PAID" | "VOID" | "AUTO_CLOSED"yesOPEN, PAID, VOID or AUTO_CLOSED.
paymentModestring | nullyesHow it was paid (STRIPE, PADDLE, or an offline mode such as BANK_TRANSFER); null while unpaid.
paidWithstring[]yesWhat paid the invoice, balance first, such as [INVOICE_BALANCE, GATEWAY_CARD]. Empty until it is paid.
issuedAtstringyesWhen the invoice was issued.
paidAtstring | nullnoWhen the invoice was paid. null while it is not paid.
invoicePdfUrlstring | nullyesSigned link that downloads the invoice PDF, with no sign-in. null only while Invoices is locked.
receiptPdfUrlstring | nullyesSigned link that downloads the payment receipt PDF, with no sign-in. null unless PAID.

PackageInvoiceInfo

What a package attach invoice bills: one row per package of the attach, in the order of the attach.

FieldTypeRequiredDescription
packagesobject[]yesThe packages the invoice bills.

PackageInvoiceInfo.packages

FieldTypeRequiredDescription
purchasePackageIdstringyesThe package's id on the subscription.
packageIdstring | nullyesThe package in the catalog. null when it no longer exists.
namestringyesThe package's name.
term"RECURRING" | "ONE_TIME"yesRECURRING or ONE_TIME, as attached.
subtotalUsdnumberyesIts price on the invoice, before tax, in USD.

Get a plan change GET

One plan change: its status, the days, the credit and charge it worked out, the credit note and invoice it made, and the new purchase.

Get an invoice GET

Next Page