Create Subscription
Try it
Parameters
Bodyapplication/json
Request sample
curl -X POST 'https://one.ozow.com/v1/subscriptions' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: string' \
-H 'X-Correlation-ID: 00000000-0000-0000-0000-000000000000' \
-d '{
"siteCode": "ABC-123456789",
"amount": {
"currency": "ZAR",
"value": 50
},
"amountConstraints": {
"min": {
"currency": "ZAR",
"value": 50
},
"max": {
"currency": "ZAR",
"value": 50
}
},
"payableNow": {
"amount": {
"currency": "ZAR",
"value": 50
},
"date": "2026-06-25"
},
"identity": {
"type": "said",
"country": "ZA",
"identifier": "string"
},
"description": "Monthly plan",
"merchantReference": "SUB-0001",
"bankReference": "MyStore",
"frequency": "Monthly",
"firstPaymentDate": "2026-07-01",
"occurrences": 12,
"paymentMethod": "capitec"
}'Response example
Built from the response schema. Values are placeholders, not real data.
https://one.ozow.com/v1/subscriptionsProductionBuild with AI 1 package
A build package is every page for one task, with the API operations they use. Copy the prompt into a coding assistant, or hand it the package itself: slim links to each page, full inlines all of them in one document.
- Take a recurring paymentEverything needed to collect from a customer on a schedule with One API, from the consent the customer gives once through to each collection and the webhook that reports it.
Create a recurring payment subscription. The response includes a redirectUrl to the hosted page where the customer authorises the amount band; the subscription becomes active once authorised.
Authentication
- OAuth 2.0scopes
subscriptions
Header parameters
Idempotency-KeystringThe unique key idempotency keyIdempotency A request is idempotent when sending it twice has the same effect as sending it once. It matters most where a retry after a timeout could otherwise take a payment twice.IETF draft as per the following IETF Draft
X-Correlation-IDstringOptional correlation id for the request, if not supplied a new one will be generated and passed onto all underlying requests and returned as a header.
Request body
siteCodestring requiredThe site codeSite code The unique code for a site registered under a merchant. A site is a place to transact: a website, or a branch of a store. A merchant can have several, and each transaction names the one it belongs to, so sending the wrong code files the payment against the wrong place. the subscription belongs to.
max length50The recurring charge amount. Must be
ZARand fall within the authorised band[amountConstraints.min, amountConstraints.max].Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
The per-payment authorisation band the customer approves.
Fields of
AmountConstraintsThe minimum authorised per-payment amount. Whole RandZAR The ISO 4217 code for the South African rand, and the currency every amount on this site is in unless a page says otherwise. Amounts are decimal rand rather than cents, so
100.00is one hundred rand., greater than 0.Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
The maximum authorised per-payment amount. Whole RandZAR The ISO 4217 code for the South African rand, and the currency every amount on this site is in unless a page says otherwise. Amounts are decimal rand rather than cents, so
100.00is one hundred rand., greater thanmin, and not exceeding 100000.Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
payableNowPayableNowAn optional once-off charge taken at sign-up. This charge is not bound by
amountConstraints.Fields of
PayableNowThe once-off charge amount. Must be
ZAR.Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
datestring date requiredThe date the once-off charge is taken. Must be today or a future date.
identityobjectAn optional customer identifier used for matching. Treated as personal information: it is accepted on the request but is never returned on any response (POPIAPOPIA South Africa's data protection law. It governs how personal information about a payer may be collected, stored and shared.popia.co.za data minimisation).
typestring requiredThe type of identification for the customer.
values"said""passport""registration""cellphone"countrystring requiredThe ISO 3166 alpha-2ISO 3166-1 alpha-2 The two-letter country codes published by the International Organization for Standardization, such as
ZAfor South Africa andGBfor the United Kingdom. Always uppercase.Wikipedia code for the country of identification.min length2max length2identifierstring requiredThe identifier value for the given identity type.
max length20
descriptionstring requiredA short description of the subscription.
max length20merchantReferencestring requiredYour unique reference for the subscription. Must not contain spaces.
max length50pattern^\S+$bankReferencestring requiredThe reference that appears on the merchant's bank statement for each payment in the subscription. Letters and numbers only. A site prefix, where one is configured, counts towards the 20 characters.
max length20pattern^[a-zA-Z0-9]+$The billing cadence of a subscription.
values"Daily""Weekly""Fortnightly""Monthly""Biannually""Annually"firstPaymentDatestring date requiredThe date of the first scheduled charge. Must be today or a future date.
occurrencesinteger requiredThe total number of scheduled charges over the life of the subscription.
min1max120paymentMethodstringOptional. The payment method (rail) used to collect charges. Defaults to
capitecwhen omitted, which is currently the only supported method. Not returned on responses.values"capitec"
Responses
X-Correlation-IDheaderThe correlation id for the request that was processed.
LocationheaderThe unique URI for this subscription.
subscriptionIdstring requiredThe unique identifier of the subscription.
The lifecycle status of a subscription:
PendingAuthorization- created, awaiting customer authorisation viaredirectUrl.Active- authorised; scheduled charges are being taken.Canceled- cancelled; no further charges.Completed- all scheduled occurrences have been taken.Expired- the authorisation lapsed before activation.Failed- the subscription could not be established or sustained.Unknown- the status could not be determined.
values"PendingAuthorization""Active""Canceled""Completed""Expired""Failed""Unknown"siteCodestring requiredThe site codeSite code The unique code for a site registered under a merchant. A site is a place to transact: a website, or a branch of a store. A merchant can have several, and each transaction names the one it belongs to, so sending the wrong code files the payment against the wrong place. the subscription belongs to.
The recurring charge amount.
Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
amountConstraintsAmountConstraintsThe authorised per-payment band. Returned on create and get.
Fields of
AmountConstraintsThe minimum authorised per-payment amount. Whole RandZAR The ISO 4217 code for the South African rand, and the currency every amount on this site is in unless a page says otherwise. Amounts are decimal rand rather than cents, so
100.00is one hundred rand., greater than 0.Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
The maximum authorised per-payment amount. Whole RandZAR The ISO 4217 code for the South African rand, and the currency every amount on this site is in unless a page says otherwise. Amounts are decimal rand rather than cents, so
100.00is one hundred rand., greater thanmin, and not exceeding 100000.Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
payableNowPayableNowThe once-off sign-up charge. Returned on create only.
Fields of
PayableNowThe once-off charge amount. Must be
ZAR.Fields of
Amountcurrencystring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia current code.min length3max length3valuenumber float requiredThe amount in the currency specified.
min0.01
datestring date requiredThe date the once-off charge is taken. Must be today or a future date.
descriptionstringThe subscription description.
merchantReferencestring requiredYour reference for the subscription.
bankReferencestringThe reference that appears on the merchant's bank statement for each payment in the subscription.
frequencySubscriptionFrequencyThe billing cadence of a subscription.
values"Daily""Weekly""Fortnightly""Monthly""Biannually""Annually"firstPaymentDatestring date requiredThe date of the first scheduled charge.
occurrencesinteger requiredThe total number of scheduled charges.
redirectUrlstring uriThe hosted authorisation page the customer must be redirected to in order to approve the subscription. Present while authorisation is pending.
authorizationobjectThe customer's authorisation (consent) status. Populated once the customer has authorised via
redirectUrl.statusstringThe provider-mirrored authorisation status.
linksobject requiredRelated resource links for the subscription.
selfstring uriThe URI of this subscription.
cancelstring uriThe URI to cancel this subscription.
transactionsstring uriThe URI to create an ad-hoc charge against this subscription.
X-Correlation-IDheaderThe correlation id for the request that was processed.
idstring uuid requireda unique identifier for this particular occurrence of the problem.
linksobject nullablePresent on an authentication or authorisation failure, and null otherwise.
aboutstring uriA link that leads to further details about this particular occurrence of the problem. When derefenced, this URI SHOULD return a human-readable description of the error.
typestring uriA link that identifies the type of error that this particular error is an instance of. This URI SHOULD be dereferencable to a human-readable explanation of the general error.
codestring requiredAn application-specific error code, expressed as a string value. Key on this rather than on
titleordetail, which are written for a person. A rejection at the transport level uses the status name, one ofBadRequest,Unauthorized,Forbidden,NotFound,NotAllowed,Conflict,UnsupportedMediaType,BadGatewayorInternalServerError. An operation refusing a request on its own rules returns a code of its own.titlestring requiredA short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
detailstring requiredA human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
sourceobject nullableWhere in the request the problem was found. All three keys are present whenever
sourceis, with the ones that do not apply set to null.sourceitself is null where the failure is not about a part of the request.pointerstring json-pointer nullablea JSON PointerJSON Pointer A path into a JSON document, written as
/data/attributes/title. An error response uses one to say exactly which value caused the problem.RFC 6901 RFC6901 to the value in the request document that caused the error [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]. This MUST point to a value in the request document that exists; if it doesn’t, the client SHOULD simply ignore the pointer.parameterstring nullableA string indicating which URI query parameter caused the error.
headerstring nullableA string indicating the name of a single request header which caused the error.
metaobject nullableA meta object containing non-standard meta-information about the error. Null where the request carried no
X-Correlation-ID, and on an authentication failure, which does not echo it.correlationIdstringThe
X-Correlation-IDsent with the request, echoed back so it can be quoted to support. Absent when the request carried no correlation header.
{
"id": "3a6c9e01-5f2b-4d8a-9c47-1e0b7d5a2f83",
"links": null,
"code": "BadRequest",
"title": "Bad Request",
"detail": "amount: Amount must be greater than 0",
"source": {
"pointer": "/amount",
"parameter": null,
"header": null
},
"meta": {
"correlationId": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
}X-Correlation-IDheaderThe correlation id for the request that was processed.
idstring uuid requireda unique identifier for this particular occurrence of the problem.
linksobject nullablePresent on an authentication or authorisation failure, and null otherwise.
aboutstring uriA link that leads to further details about this particular occurrence of the problem. When derefenced, this URI SHOULD return a human-readable description of the error.
typestring uriA link that identifies the type of error that this particular error is an instance of. This URI SHOULD be dereferencable to a human-readable explanation of the general error.
codestring requiredAn application-specific error code, expressed as a string value. Key on this rather than on
titleordetail, which are written for a person. A rejection at the transport level uses the status name, one ofBadRequest,Unauthorized,Forbidden,NotFound,NotAllowed,Conflict,UnsupportedMediaType,BadGatewayorInternalServerError. An operation refusing a request on its own rules returns a code of its own.titlestring requiredA short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
detailstring requiredA human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
sourceobject nullableWhere in the request the problem was found. All three keys are present whenever
sourceis, with the ones that do not apply set to null.sourceitself is null where the failure is not about a part of the request.pointerstring json-pointer nullablea JSON PointerJSON Pointer A path into a JSON document, written as
/data/attributes/title. An error response uses one to say exactly which value caused the problem.RFC 6901 RFC6901 to the value in the request document that caused the error [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]. This MUST point to a value in the request document that exists; if it doesn’t, the client SHOULD simply ignore the pointer.parameterstring nullableA string indicating which URI query parameter caused the error.
headerstring nullableA string indicating the name of a single request header which caused the error.
metaobject nullableA meta object containing non-standard meta-information about the error. Null where the request carried no
X-Correlation-ID, and on an authentication failure, which does not echo it.correlationIdstringThe
X-Correlation-IDsent with the request, echoed back so it can be quoted to support. Absent when the request carried no correlation header.
{
"id": "1cecc2b7-1c29-418a-b26a-bf7546926083",
"links": {
"about": "https://ozow.stoplight.io/docs/one-api/zi18vomr0jm8c-generate-authentication-token",
"type": "https://tools.ietf.org/html/rfc7235#section-3.1"
},
"code": "Unauthorized",
"title": "Unauthorized Request",
"detail": "Authorization header is missing or invalid.",
"source": {
"pointer": null,
"parameter": null,
"header": "Authorization"
},
"meta": null
}X-Correlation-IDheaderThe correlation id for the request that was processed.
idstring uuid requireda unique identifier for this particular occurrence of the problem.
linksobject nullablePresent on an authentication or authorisation failure, and null otherwise.
aboutstring uriA link that leads to further details about this particular occurrence of the problem. When derefenced, this URI SHOULD return a human-readable description of the error.
typestring uriA link that identifies the type of error that this particular error is an instance of. This URI SHOULD be dereferencable to a human-readable explanation of the general error.
codestring requiredAn application-specific error code, expressed as a string value. Key on this rather than on
titleordetail, which are written for a person. A rejection at the transport level uses the status name, one ofBadRequest,Unauthorized,Forbidden,NotFound,NotAllowed,Conflict,UnsupportedMediaType,BadGatewayorInternalServerError. An operation refusing a request on its own rules returns a code of its own.titlestring requiredA short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
detailstring requiredA human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
sourceobject nullableWhere in the request the problem was found. All three keys are present whenever
sourceis, with the ones that do not apply set to null.sourceitself is null where the failure is not about a part of the request.pointerstring json-pointer nullablea JSON PointerJSON Pointer A path into a JSON document, written as
/data/attributes/title. An error response uses one to say exactly which value caused the problem.RFC 6901 RFC6901 to the value in the request document that caused the error [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]. This MUST point to a value in the request document that exists; if it doesn’t, the client SHOULD simply ignore the pointer.parameterstring nullableA string indicating which URI query parameter caused the error.
headerstring nullableA string indicating the name of a single request header which caused the error.
metaobject nullableA meta object containing non-standard meta-information about the error. Null where the request carried no
X-Correlation-ID, and on an authentication failure, which does not echo it.correlationIdstringThe
X-Correlation-IDsent with the request, echoed back so it can be quoted to support. Absent when the request carried no correlation header.
{
"id": "2f8b6d40-1c7e-49a5-b03f-8d5a2e1c9704",
"links": null,
"code": "Conflict",
"title": "Conflict",
"detail": "Idempotency key and request data do not match a previous request.",
"source": {
"pointer": null,
"parameter": null,
"header": "Idempotency-Key"
},
"meta": {
"correlationId": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
}X-Correlation-IDheaderThe correlation id for the request that was processed.
idstring uuid requireda unique identifier for this particular occurrence of the problem.
linksobject nullablePresent on an authentication or authorisation failure, and null otherwise.
aboutstring uriA link that leads to further details about this particular occurrence of the problem. When derefenced, this URI SHOULD return a human-readable description of the error.
typestring uriA link that identifies the type of error that this particular error is an instance of. This URI SHOULD be dereferencable to a human-readable explanation of the general error.
codestring requiredAn application-specific error code, expressed as a string value. Key on this rather than on
titleordetail, which are written for a person. A rejection at the transport level uses the status name, one ofBadRequest,Unauthorized,Forbidden,NotFound,NotAllowed,Conflict,UnsupportedMediaType,BadGatewayorInternalServerError. An operation refusing a request on its own rules returns a code of its own.titlestring requiredA short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
detailstring requiredA human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.
sourceobject nullableWhere in the request the problem was found. All three keys are present whenever
sourceis, with the ones that do not apply set to null.sourceitself is null where the failure is not about a part of the request.pointerstring json-pointer nullablea JSON PointerJSON Pointer A path into a JSON document, written as
/data/attributes/title. An error response uses one to say exactly which value caused the problem.RFC 6901 RFC6901 to the value in the request document that caused the error [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]. This MUST point to a value in the request document that exists; if it doesn’t, the client SHOULD simply ignore the pointer.parameterstring nullableA string indicating which URI query parameter caused the error.
headerstring nullableA string indicating the name of a single request header which caused the error.
metaobject nullableA meta object containing non-standard meta-information about the error. Null where the request carried no
X-Correlation-ID, and on an authentication failure, which does not echo it.correlationIdstringThe
X-Correlation-IDsent with the request, echoed back so it can be quoted to support. Absent when the request carried no correlation header.
{
"id": "6c3a1f95-8d07-4e2b-a94c-5f0b7d2e8134",
"links": null,
"code": "BadGateway",
"title": "Bad Gateway",
"detail": "The upstream service is currently unavailable. Please try again shortly.",
"source": null,
"meta": {
"correlationId": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
}