API
Subscriptions API
List, retrieve, pause, resume and cancel gateway-managed card subscriptions started by recurring payment links.
On this page
Overview#
A subscription is created when a payer completes a recurring payment link. The gateway (PayFast or Netcash Pay Now) then charges the card automatically on each cycle; every collection appears as a new transaction with renewal: true. Use this API to look subscriptions up and to pause, resume or cancel them. Changes are also pushed as subscription webhooks (subscription.activated, .charged, .payment_failed, .paused, .resumed, .cancelled). See the Recurring billing guide for the full picture.
The subscription object#
{
"id": "cmg2s5b8k0007sub0001abcd",
"status": "active",
"frequency": "monthly",
"amount": 499,
"currency": "ZAR",
"gateway": "payfast",
"paymentLinkId": "cmg1k2x3y0001abcd1234efgh",
"externalReference": "SUB-ACME-PRO",
"metadata": {
"plan": "pro"
},
"createdAt": "2026-09-25T08:14:04.000Z",
"updatedAt": "2026-09-25T08:14:04.000Z"
}| Field | Type | Description |
|---|---|---|
idrequired | string | Subscription ID (also returned as subscriptionId on transactions and webhooks). |
statusrequired | string | active, paused or cancelled. |
frequencyrequired | string | null | monthly, quarterly, biannually or annually. |
amountrequired | number | null | Amount of each collection. |
currencyrequired | string | Currency of the payment link. |
gatewayrequired | string | E.g. payfast, netcash_paynow. |
paymentLinkIdrequired | string | null | The recurring link that started it. |
externalReferencerequired | string | null | That link's externalReference. |
metadatarequired | object | That link's metadata. |
createdAt, updatedAtrequired | string |
List subscriptions#
/api/v1/subscriptions| Field | Type | Description |
|---|---|---|
externalReferenceoptional | string | The payment link's externalReference. |
limitoptional | integer | 1–100, default 20. |
curl -X GET "https://app.centrapoint.co.za/api/v1/subscriptions?externalReference=SUB-ACME-PRO" \
-H "Authorization: Bearer $CENTRAPOINT_API_KEY"Get a subscription#
/api/v1/subscriptions/{id}curl -X GET "https://app.centrapoint.co.za/api/v1/subscriptions/cmg2s5b8k0007sub0001abcd" \
-H "Authorization: Bearer $CENTRAPOINT_API_KEY"Pause, resume and cancel rules#
| Action | Allowed from | Result | Webhook | Gateways |
|---|---|---|---|---|
pause | active | paused | subscription.paused | Those that support pausing, e.g. PayFast |
resume | paused | active | subscription.resumed | Those that support pausing, e.g. PayFast |
cancel | active or paused | cancelled | subscription.cancelled | PayFast, Netcash Pay Now |
- CentraPoint asks the gateway first and only changes the status when the gateway accepts. If it refuses, you get
502 gateway_errorand nothing changes. - Repeats are safe: calling an action that has already taken effect (pause when paused, resume when active, cancel when cancelled) returns
200with the subscription unchanged and sends no webhook. These endpoints don't use the Idempotency-Key header. - Invalid transitions return
409 invalid_state, e.g. pausing or resuming a cancelled subscription. - Unsupported actions return
409 unsupported: Netcash Pay Now subscriptions can only be cancelled, so pausing or resuming one is refused before anything is sent to the gateway (and the dashboard hides its Pause button). The status checks above come first, so a repeat still returns200and an invalid transition409 invalid_state. - The same actions in the dashboard send the same webhooks.
Pause a subscription#
/api/v1/subscriptions/{id}/pauseStops collections until resumed. Returns the subscription with status: "paused". No body is needed.
curl -X POST "https://app.centrapoint.co.za/api/v1/subscriptions/cmg2s5b8k0007sub0001abcd/pause" \
-H "Authorization: Bearer $CENTRAPOINT_API_KEY"Resume a subscription#
/api/v1/subscriptions/{id}/resumeRestarts collections for a paused subscription. Returns it with status: "active". No body is needed.
curl -X POST "https://app.centrapoint.co.za/api/v1/subscriptions/cmg2s5b8k0007sub0001abcd/resume" \
-H "Authorization: Bearer $CENTRAPOINT_API_KEY"Cancel a subscription#
/api/v1/subscriptions/{id}/cancelAsks the gateway to stop future collections, then marks the subscription cancelled, sends the subscription.cancelled webhook and returns it. No body is needed. Allowed from active or paused; cancelling an already cancelled subscription returns it unchanged. Payments already collected are not refunded.
curl -X POST "https://app.centrapoint.co.za/api/v1/subscriptions/cmg2s5b8k0007sub0001abcd/cancel" \
-H "Authorization: Bearer $CENTRAPOINT_API_KEY"Errors#
| Status | error | When |
|---|---|---|
| 404 | not_found | No subscription with this ID in your organisation. |
| 409 | invalid_state | The action isn't allowed from the current status (e.g. resume a cancelled subscription). Nothing changed. |
| 409 | unsupported | The subscription's gateway can't do this action, e.g. pause or resume on Netcash Pay Now (cancel only). Nothing changed. |
| 502 | gateway_error | The gateway rejected or failed the request. Nothing changed; retry later. |
| 403 | plan_restricted / account_restricted | No API access, or the account is read-only (actions). |
| 401 / 429 / 500 | unauthorized / rate_limited / internal_error | See Errors |