List purchases
The workspace's purchases, newest first. Filter by customerId or status (COMPLETED, PENDING or CANCELLED). Paged with limit (at most 50) and cursor; see Paginating results. Any other parameter is a 400.
Base URL https://payments.clocknext.com/api/v1
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
customerId?stringRestrict results to this customer.
status?stringFilter by status, by payment (case-insensitive). Any other value is a 400: "status must be COMPLETED, PENDING, or CANCELLED."
"COMPLETED""PENDING""CANCELLED"limit?integerRows 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.
1 <= value <= 5050cursor?stringId to page after — the last id of the previous page.
Purchases.
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*One page of purchases.
curl -X GET 'https://payments.clocknext.com/api/v1/purchases?customerId=cus_abc123&status=PENDING&limit=50&cursor=cus_zzz789'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "purchases": [ { "id": "cmvgvksil005p08l2ggbacq1l", "purchaseNumber": "PUR-009", "subscriptionNumber": "SUB-008", "customerId": "cmvgva5po000c07iir1vtn8vl", "customerName": "Northwind Traders", "customerLogoUrl": "https://img.logo.dev/northwindtraders.com?token=pk_XyJ5Zd6NSUexPIq3rDQr4A&size=128&format=png&retina=true", "planId": "cmvgvgfob001m08l2upi4aokj", "planName": "Starter", "planType": "BUNDLE", "hasWallet": true, "hasCredit": true, "hasOutcome": false, "hasUnit": true, "hasComposite": false, "billingCycle": "MONTHLY", "cost": 29, "currencyCode": "USD", "billingDate": "2026-10-20T00:00:00.000Z", "nextBillingDate": "2026-11-20T00:00:00.000Z", "status": "CANCELLED", "voidAfterMinutes": 52560000, "autoPayment": false, "autoPaymentPauseReason": null, "notes": null, "createdAt": "2026-10-20T16:05:59.517Z" }, { "id": "cmvgvkq9x004r08l28dpahwhv", "purchaseNumber": "PUR-007", "subscriptionNumber": "SUB-006", "customerId": "cmvgvklx5002f08l2875y93k8", "customerName": "Litware Inc", "customerLogoUrl": null, "planId": "cmvgvgfob001m08l2upi4aokj", "planName": "Starter", "planType": "BUNDLE", "hasWallet": true, "hasCredit": true, "hasOutcome": false, "hasUnit": true, "hasComposite": false, "billingCycle": "MONTHLY", "cost": 29, "currencyCode": "USD", "billingDate": "2026-10-20T00:00:00.000Z", "nextBillingDate": "2026-11-20T00:00:00.000Z", "status": "COMPLETED", "voidAfterMinutes": 52560000, "autoPayment": false, "autoPaymentPauseReason": null, "notes": null, "createdAt": "2026-10-20T16:05:56.613Z" }, { "id": "cmvgvkptw004i08l2d8vveucu", "purchaseNumber": "PUR-006", "subscriptionNumber": "SUB-005", "customerId": "cmvgv9650000407iigjb3lt2p", "customerName": "Adventure Works", "customerLogoUrl": null, "planId": "cmvgvg38w001808l2j7k6ykx3", "planName": "Growth (6-month)", "planType": "BUNDLE", "hasWallet": false, "hasCredit": true, "hasOutcome": true, "hasUnit": false, "hasComposite": true, "billingCycle": "SEMI_ANNUAL", "cost": 2400, "currencyCode": "USD", "billingDate": "2026-11-03T00:00:00.000Z", "nextBillingDate": "2026-11-03T00:00:00.000Z", "status": "PENDING", "voidAfterMinutes": 52560000, "autoPayment": false, "autoPaymentPauseReason": null, "notes": "Starts after onboarding", "createdAt": "2026-10-20T16:05:56.037Z" }, { "id": "cmvgvkp6r004a08l22itk1bh6", "purchaseNumber": "PUR-005", "subscriptionNumber": null, "customerId": "cmvgv9elh000807iixkqqodos", "customerName": "Wingtip Labs", "customerLogoUrl": null, "planId": "cmvgvg2dn000n08l23x83smgo", "planName": "Free", "planType": "BUNDLE", "hasWallet": true, "hasCredit": true, "hasOutcome": false, "hasUnit": true, "hasComposite": false, "billingCycle": "FREE", "cost": 0, "currencyCode": "USD", "billingDate": "2026-10-20T00:00:00.000Z", "nextBillingDate": "2026-10-20T00:00:00.000Z", "status": "COMPLETED", "voidAfterMinutes": 52560000, "autoPayment": false, "autoPaymentPauseReason": null, "notes": null, "createdAt": "2026-10-20T16:05:55.203Z" }, { "id": "cmvgvko9x003n08l2m19o4vgs", "purchaseNumber": "PUR-003", "subscriptionNumber": "SUB-003", "customerId": "cmvgv9dyg000607ii9z6oghzf", "customerName": "Fabrikam Analytics", "customerLogoUrl": null, "planId": "cmvgvg3iy001e08l2v6t2frb0", "planName": "Scale (pay as you go)", "planType": "BUNDLE", "hasWallet": true, "hasCredit": true, "hasOutcome": true, "hasUnit": true, "hasComposite": true, "billingCycle": "QUARTERLY", "cost": 1000, "currencyCode": "USD", "billingDate": "2026-10-20T00:00:00.000Z", "nextBillingDate": "2027-01-20T00:00:00.000Z", "status": "COMPLETED", "voidAfterMinutes": 52560000, "autoPayment": false, "autoPaymentPauseReason": "Card expired — waiting on a replacement", "notes": null, "createdAt": "2026-10-20T16:05:54.021Z" }, { "id": "cmvgvknlz003408l21rnqtsl2", "purchaseNumber": "PUR-002", "subscriptionNumber": "SUB-002", "customerId": "cmvgv9th0000a07iisl2s8u6q", "customerName": "Contoso Pharmaceuticals", "customerLogoUrl": null, "planId": "cmvgvgg51001s08l2gb0zp7wp", "planName": "Enterprise", "planType": "BUNDLE", "hasWallet": true, "hasCredit": true, "hasOutcome": true, "hasUnit": true, "hasComposite": true, "billingCycle": "YEARLY", "cost": 60000, "currencyCode": "USD", "billingDate": "2026-10-20T00:00:00.000Z", "nextBillingDate": "2027-10-20T00:00:00.000Z", "status": "COMPLETED", "voidAfterMinutes": 52560000, "autoPayment": false, "autoPaymentPauseReason": null, "notes": "Signed MSA 2026-10", "createdAt": "2026-10-20T16:05:53.160Z" } ], "nextCursor": null }}Types
Every object type on this page, with its fields.
Purchase
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The purchase's id. |
purchaseNumber | string | yes | The workspace's reference for the purchase, such as PUR-042. |
subscriptionNumber | string | null | yes | The subscription's reference. null on a FREE plan and on older purchases. |
customerId | string | yes | The id of the customer who holds the purchase. |
customerName | string | yes | The customer's name. |
customerLogoUrl | string | null | yes | The customer's logo URL. It can be a data: URL. null when no logo is set. |
planId | string | null | yes | The id of the plan bought. null when that plan was deleted later. |
planName | string | yes | The plan's name, saved when the purchase was created. |
planType | "WALLET" | "BUNDLE" | yes | BUNDLE when the plan has credit, outcome or composite lines, else WALLET. Saved at purchase. |
hasWallet | boolean | yes | Whether the plan has a wallet line. Read from the plan as it is now. false when the plan was deleted. |
hasCredit | boolean | yes | Whether the plan has a credit line. Read from the plan as it is now. false when the plan was deleted. |
hasOutcome | boolean | yes | Whether the plan has an outcome line. Read from the plan as it is now. false when the plan was deleted. |
hasUnit | boolean | yes | Whether the plan has a unit line. Read from the plan as it is now. false when the plan was deleted. |
hasComposite | boolean | yes | Whether the plan has a composite line. Read from the plan as it is now. false when the plan was deleted. |
billingCycle | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "YEARLY" | "FREE" | yes | The plan's billing cycle, saved when the purchase was created. |
cost | number | yes | The pay-in-advance price of one cycle in USD, saved at purchase. 0 on a FREE plan; usage is billed apart. |
currencyCode | string | yes | The currency the plan's price was set in, for display. cost stays in USD. |
billingDate | string | yes | The purchase's billing date, as set when it was created. |
nextBillingDate | string | yes | When the next billing period starts. Before the plan starts, when its first period starts. |
status | "COMPLETED" | "PENDING" | "CANCELLED" | yes | COMPLETED, PENDING or CANCELLED, by payment. |
voidAfterMinutes | integer | yes | Minutes an unpaid renewal invoice stays open before it is voided. |
autoPayment | boolean | yes | When true, invoices from the second cycle on are charged to the saved card. |
autoPaymentPauseReason | string | null | yes | The pauseReason sent when auto-payment was paused. null while it is on. |
notes | string | null | yes | A free note saved on the purchase. null when none was given. |
createdAt | string | yes | When the purchase was created. |
Update a tax PATCH
Updates only the fields you send. Archived taxes can be edited and stay archived. Invoices already issued keep the tax they were issued with. Renaming onto another active tax in the same country is a `409`.
Create a purchase POST
Subscribes a customer to a plan. It is `PENDING` with a first invoice (`invoice.payUrl`) and starts once that is paid. With `autoPayment: true` the balance, then the saved card, pay it. A FREE plan starts at once. It replaces any current plan without credit; for credit, [change plan](/docs/api-reference/plan-changes/createPlanChange).