Get a purchase
One purchase. status is by payment (COMPLETED, PENDING or CANCELLED); lifecycleStatus says whether the plan has started.
Base URL https://payments.clocknext.com/api/v1
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringPurchase id.
Purchase detail.
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*The purchase with this id, in purchase.
curl -X GET 'https://payments.clocknext.com/api/v1/purchases/pur_ghi789'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Request processed successfully." }, "result": { "purchase": { "id": "cmvgvknlz003408l21rnqtsl2", "purchaseNumber": "PUR-002", "subscriptionNumber": "SUB-002", "status": "COMPLETED", "lifecycleStatus": "ACTIVE", "cost": 60000, "billingCycle": "YEARLY", "planName": "Enterprise", "billingDate": "2026-10-20T00:00:00.000Z", "nextBillingDate": "2027-10-20T00:00:00.000Z", "createdAt": "2026-10-20T16:05:53.160Z", "createdByName": "Josewin D D", "customer": { "id": "cmvgv9th0000a07iisl2s8u6q", "name": "Contoso Pharmaceuticals", "logoUrl": null }, "voidAfterMinutes": 52560000, "autoPayment": false, "autoPaymentPauseReason": null, "autoPaymentPausedAt": null, "notes": "Signed MSA 2026-10", "plan": { "id": "cmvgvgg51001s08l2gb0zp7wp" }, "stats": { "invoiceCount": 1, "paidCount": 1 } } }}Types
Every object type on this page, with its fields.
PurchaseDetail
| 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 | no | The subscription's reference. null on a FREE plan and on older purchases. |
status | "COMPLETED" | "PENDING" | "CANCELLED" | yes | COMPLETED, PENDING or CANCELLED, by payment. |
lifecycleStatus | "SCHEDULED" | "ACTIVE" | "CANCELLED" | yes | Whether the plan has started: SCHEDULED until it starts, then ACTIVE; CANCELLED once cancelled. |
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. |
billingCycle | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "YEARLY" | "FREE" | yes | The plan's billing cycle, saved when the purchase was created. |
planName | string | yes | The plan's name, saved when the purchase was created. |
billingDate | string | yes | The purchase's billing date, as set when it was created. It does not move forward from cycle to cycle. |
nextBillingDate | string | yes | When the next billing period starts. Before the plan starts, when its first period starts. |
createdAt | string | yes | When the purchase was created. |
createdByName | string | no | Who created it: the member's name or email. Through the API: the API key's creator. |
customer | object | no | The customer who holds the purchase. |
voidAfterMinutes | integer | no | Minutes an unpaid renewal invoice stays open before it is voided. |
autoPayment | boolean | no | When true, invoices from the second cycle on are charged to the saved card. |
autoPaymentPauseReason | string | null | no | The pauseReason sent when auto-payment was paused. null while it is on. |
autoPaymentPausedAt | string | null | no | When auto-payment was last paused. null while auto-payment is on, or when it was never paused. |
notes | string | null | no | A free note saved on the purchase. null when none was given. |
plan | object | null | no | The plan this purchase was made from. null when that plan was deleted later. |
stats | object | no | Invoice counts for this purchase. |
PurchaseDetail.customer
The customer who holds the purchase.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The customer's id. |
name | string | yes | The customer's name. |
logoUrl | string | null | yes | The customer's logo URL. It can be a data: URL. null when no logo is set. |
PurchaseDetail.plan
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | The plan's id. |
PurchaseDetail.stats
Invoice counts for this purchase.
| Field | Type | Required | Description |
|---|---|---|---|
invoiceCount | integer | no | How many invoices the purchase raised, of every status. |
paidCount | integer | no | How many of the purchase's invoices are PAID. |
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).
Update a purchase's auto-payment setting PATCH
Next Page