Request Payment
Try it
Parameters
Bodyapplication/json
Request sample
curl -X POST 'https://one.ozow.com/v1/payments' \
-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": "SITE-001",
"region": "ZA",
"amount": {
"currency": "ZAR",
"value": 50
},
"variableAmount": {
"minimumValue": 10,
"maximumValue": 50
},
"merchantReference": "12345-abcde",
"beneficiaryReference": "ONLINESHOP002",
"payerReference": "12345-abcde",
"payer": {
"id": "string",
"name": "Firstname Lastname",
"identity": {
"type": "said",
"country": "ZA",
"identifier": "0000000000000"
},
"cellphone": "+27821234567",
"email": "a@example.com"
},
"returnUrl": "https://example.com/",
"notifyUrl": "https://example.com/",
"expireAt": "2026-01-15T09:30:00Z",
"institutionId": "00000000-0000-0000-0000-000000000000"
}'Response example
Built from the response schema. Values are placeholders, not real data.
https://one.ozow.com/v1/paymentsProductionBuild with AI 3 packages
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 paymentEverything needed to take a payment end to end with One API, from credentials through the hosted page to the webhook that confirms it, and the test cases that prove each outcome before you go live.
- Migrate a payin from the Payments API to One APIEverything needed to move an existing redirect payin onto One API, with the legacy guide and its One API counterpart side by side.
- Migrate refunds from the Payments API to One APIEverything needed to move an existing refunds integration onto One API, with the legacy guide and its One API counterpart side by side.
Create a payment request with the specified channel and transaction details.
Authentication
- OAuth 2.0scopes
payments
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 merchant 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. in use for this payment. Site codes are available on the Ozow dashboard.
max length50regionstringISO 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 originating country of the payment.Must be "ZA" for South Africa.
If region is not specified IP geolocation will be used to determine the applicable region.
min length2max length2The currency and amount of the payment request.
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
variableAmountVariableAmountIf the payment amount can be changed by the payer, the variable amounts need to be passed in.
Fields of
VariableAmountminimumValuenumber float requiredThe minimum amount.
min0.01maximumValuenumber float requiredThe maximum amount.
min0.01
merchantReferencestring requiredThe merchant's reference for the transaction. It is pre-populated in the payer's own reference field at their bank, shortened by banks that limit it, so it is not an internal-only value.
max length50beneficiaryReferencestringThe reference that appears on the merchant's bank statement for the payment. Letters and numbers only. Rejected as missing unless the site is configured to let the payer supply the reference. A site prefix, where one is configured, counts towards the 20 characters.
max length20pattern^[A-Za-z0-9]*$payerReferencestringmax length20payerPayerInformation on the payer used for identification and fraud purposes.
Fields of
Payeridstring requiredThe merchant identifier for the payer.
max length50namestring requiredmax length200identityIdentificationThe identity of a payer. In high risk cases this information is required.
Fields of
Identificationtypestring requiredThe type of identification for the person or business.
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 identifier for the country of identification.min length2max length2identifierstring requiredThe identifier for the consumer based on the identity type.
max length20
cellphonestringThe cellphone number for the payer.
max length15emailstring emailThe email address of the payer.
returnUrlstring uriThe URI that Ozow needs to redirectRedirect Sending the payer to the Ozow payment page to complete the payment, and returning them to your site afterwards. The alternative is embedding the checkout in your own page, where the payer never leaves it. back to once the payment has reached a conclusion. Must be reachable from the internet.
localhostis rejected with a 403, so a local integration needs a tunnel rather than the address the browser uses.notifyUrlstring uriOptional notify URL to send notifications of the status of the payment. The recommendation is to use webhooks instead of this method which are configurable via the webhooks endpoints of the API or via the Ozow Dashboard. Must be reachable from the internet.
localhostis rejected with a 403, so a local integration needs a tunnel rather than the address the browser uses.expireAtstring date-time requiredThe date and time the payment request should expire at and make the payment link unusable
institutionIdstring uuidThe institution to send the payer straight to, skipping the payment method selection screen. The identifier for each payment method is on that method's page under Payment products.
Responses
X-Correlation-IDheaderThe correlation id for the request that was processed.
The relevant links to the this payment.
Fields of
PaymentLinksselfstring uriThe unique URI for this resource.
cancelstring uriThe cancel URI for this payment. This is a
POSToperation.transactionsstring uriThe transactions associated with this payment request.
idstring uuid requiredThe identifier for the payment request.
The status of the payment.
values"Created""Expired"reasonstringThe payment status reason.
redirectUrlstring uriThe url to redirectRedirect Sending the payer to the Ozow payment page to complete the payment, and returning them to your site afterwards. The alternative is embedding the checkout in your own page, where the payer never leaves it. a consumer to. A redirect url will be provided should a payment require further client interaction.
X-Correlation-IDheaderThe correlation id for the request that was processed.
LocationheaderThe unique URI for this resource.
The relevant links to the this payment.
Fields of
PaymentLinksselfstring uriThe unique URI for this resource.
cancelstring uriThe cancel URI for this payment. This is a
POSToperation.transactionsstring uriThe transactions associated with this payment request.
idstring uuid requiredThe identifier for the payment request.
The status of the payment.
values"Created""Expired"reasonstringThe payment status reason.
redirectUrlstring uriThe url to redirectRedirect Sending the payer to the Ozow payment page to complete the payment, and returning them to your site afterwards. The alternative is embedding the checkout in your own page, where the payer never leaves it. a consumer to. A redirect url will be provided should a payment require further client interaction.
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": "c47a2e08-9b31-4f6d-85a0-7e2c1d9f3b56",
"links": {
"about": "https://ozow.stoplight.io/docs/one-api/zi18vomr0jm8c-generate-authentication-token",
"type": "https://tools.ietf.org/html/rfc7235#section-3.1"
},
"code": "Forbidden",
"title": "Forbidden Request",
"detail": "Request is forbidden, most likely scope does not match required scope to perform requested action.",
"source": {
"pointer": null,
"parameter": null,
"header": "Authorization"
},
"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": "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": "9e0d5a83-6b24-4c19-8f7a-2d1b3e6c0a97",
"links": null,
"code": "InternalServerError",
"title": "Internal Server Error",
"detail": "Error occurred while processing request.",
"source": {
"pointer": "/data",
"parameter": null,
"header": null
},
"meta": {
"correlationId": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
}Guides
- Quick start: accept your first paymentAccept your first Ozow payment with One API. Get a token, create a payment request, redirect the customer, and read the webhook that confirms it.
- Migrating to One APIMap a redirect payin and refunds integration from the Payments API to One API: what changes, what does not, and the order to make the changes in.
- Redirect to OzowBuild a redirect payin with One API. Create a payment request, send the customer to Ozow's hosted page, and confirm the result from the webhook.
- Payin test casesThe payments to run before you go live with Ozow, what each one delivers, and a handler that survives all of them.