Update a purchase's auto-payment setting
Base URL https://payments.clocknext.com/api/v1
apiKeyAuthorizationBearer <cnk_…>Organisation-scoped key from Settings → API Keys.
id*stringPurchase id.
application/json- body
autoPayment*booleantrue resumes automatic charges to the customer's saved card. false pauses them.
pauseReason?stringOnly meaningful when autoPayment is false.
Auto-payment updated.
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 auto-payment setting as it is now.
curl -X PATCH 'https://payments.clocknext.com/api/v1/purchases/pur_ghi789' \ -H 'Content-Type: application/json' \ -d '{ "autoPayment": false, "pauseReason": "Card expired — waiting on a replacement"}'{ "statusCode": 200, "statusDetail": { "status": "SUCCESS", "message": "Auto-billing paused." }, "result": { "autoPayment": false }}Types
Every object type on this page, with its fields.
UpdatePurchaseInput
| Field | Type | Required | Description |
|---|---|---|---|
autoPayment | boolean | yes | true resumes automatic charges to the customer's saved card. false pauses them. |
pauseReason | string | no | Only meaningful when autoPayment is false. |
Get a purchase GET
One purchase. `status` is by payment (`COMPLETED`, `PENDING` or `CANCELLED`); `lifecycleStatus` says whether the plan has started.
Cancel a purchase POST
Cancels the purchase now: it becomes `CANCELLED`, its `OPEN` invoices are voided, and usage not billed yet gets a final invoice. This also completes a subscription marked for cancellation. A purchase already cancelled answers `200` again. To cancel at the period end, use [Cancel a subscription](/docs/api-reference/subscriptions/cancelSubscription).