Create Payment Request
Try it
Bodyapplication/json
Request sample
curl -X POST 'https://api.ozow.com/postpaymentrequest' \
-H 'ApiKey: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"siteCode": "string",
"countryCode": "ZA",
"currencyCode": "ZAR",
"amount": 150.2,
"transactionReference": "string",
"bankReference": "string",
"optional1": "string",
"optional2": "string",
"optional3": "string",
"optional4": "string",
"optional5": "string",
"customer": "string",
"cancelUrl": "https://example.com/",
"errorUrl": "https://example.com/",
"successUrl": "https://example.com/",
"notifyUrl": "https://example.com/",
"isTest": true,
"selectedBankId": "00000000-0000-0000-0000-000000000000",
"bankAccountNumber": "string",
"branchCode": "string",
"bankAccountName": "ACME TRADING",
"payeeDisplayName": "string",
"expiryDateUtc": "2015-08-11 16:02",
"allowVariableAmount": true,
"variableAmountMin": 1,
"variableAmountMax": 150,
"customerIdentifier": "0000000000000",
"customerCellphoneNumber": "0821234567",
"hashCheck": "string"
}'Response example
Built from the response schema. Values are placeholders, not real data.
https://api.ozow.com/postpaymentrequestProductionBuild 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.
- Embed checkout in your own pageEverything needed to keep the customer on your site while they pay, as an iframe, a modal, or the Wallet SDK for Apple Pay and Google Pay, with the notification that actually confirms the payment.
- 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.
Creates a payment request with the requested parameter set.
Authentication
- API key in the ApiKey header
The unique API key for the merchant. See Prerequisites and onboarding for where to find it.
Request body
application/json
siteCodestring requiredA unique code for the site currently in use. A 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. is generated when adding a site in the Ozow merchant admin section.
max length50countryCodestring requiredThe ISO 3166-1 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 user's country. The country code will determine which banks will be displayed to the customer. Please note only South African (ZA) banks are currently supported by Ozow.max length2pattern^[A-Z]+currencyCodestring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia three-letter code for the transaction currency. Please note only the South African 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, so100.00is one hundred rand. (ZAR) is currently supported by Ozow, so any currency conversion must take place before posting to the Ozow site.max length3pattern^[A-Z]+amountnumber double requiredThe transaction amount. The amount is in the currency specified by the currency codeISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia posted.transactionReferencestring requiredThe merchant's reference for the transaction. This reference can be used to look up the transaction with the
GetTransactionByReferenceoperation.max length50bankReferencestring requiredThe reference that will be pre-populated in the "their reference" field in the customers online banking site. This is the payment reference that appears on the merchant’s bank statement and can be used for recon purposes. Only alphanumeric characters, spaces, and dashes are allowed.
max length20optional1stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional2stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional3stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional4stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional5stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50customerstringThe customer’s name or identifier.
max length100cancelUrlstring uriThe URL to which the 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. result should be posted to if the customer cancels the payment. This is also the page the customer will be redirected to. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the posted value will be redirected to if the payment is cancelled.
max length150errorUrlstring uriThe URL to which the 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. result should be posted if an error occurs while trying to process the payment. This is also the page the customer will be redirected to. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the posted value will be redirected to if an error occurred while processing the payment.
max length150successUrlstring uriThe URL to which the 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. result should be posted to if the payment is successful. This is also be the page the customer gets redirected to. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the posted value will be redirected to if the payment was successful.
Please note that it is not sufficient to assume that the payment was successful simply because the customer has been redirected back to this page. It is highly recommended that you check the response fields as well as the transaction status using our check transaction status API call.
max length150notifyUrlstring uriThe URL that the notification result should be posted to. The result will post regardless of the outcome of the transaction. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the notification result will be sent to the posted value. Find out more in the notification response section in step 2.
max length150isTestboolean requiredAccepted values are true or false. Send true to test your request posting and response handling. If set to true you will be redirected to select whether you would like a successful or unsuccessful 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. response sent back.
Please note that notification responses are sent for test transactions and the online banking payment is skipped.
selectedBankIdstring uuidIf the 'SelectedBankId' field is populated by the Merchant, the Customer will be redirected to the Ozow login page of the selected bank. However, if the field is left empty, the Customer will be presented with Ozow bank selection screen.
See Payment method identifiers for the value to send.
bankAccountNumberstringThe bank account number the payment should be made to.
max length20branchCodestringThe branch codeBranch code The six-digit number identifying a South African bank branch, the equivalent of a sort code or a routing number elsewhere. Each bank publishes one universal branch code that works for every account it holds, which is the one to use unless you have been given another. for the bank account.
max length10bankAccountNamestringThe name of the beneficiary account the payment is made into. Letters, digits and spaces only. Required, along with
bankAccountNumber,branchCodeandbankId, whenever any one of them is sent.max length50pattern^[a-zA-Z0-9\s]+$payeeDisplayNamestringThe name shown on the site as the entity being paid (not in banking screens).
max length50expiryDateUtcstringPayment will not be allowed to be made after this date. Date should be UTC and value should be formatted as yyyy-MM-dd HH:mm
max length19allowVariableAmountbooleanAllows the user to change the amount passed through before paying. This option must also be enabled for the site in the merchant admin portal to be used. Accepted values are true or false. DO NOT include false in the hash check string, just ignore instead.
variableAmountMinnumber doubleIf AllowVariableAmount is passed through as true, this will dictate the lowest acceptable amount the user can enter.
variableAmountMaxnumber doubleIf AllowVariableAmount is passed through as true, this will dictate the highest acceptable amount the user can enter.
customerIdentifierstringMerchants classified as high-risk must provide a valid South African identity number. It's important to note that this is an optional field for all other merchants. Capitec PayCapitec Pay Capitec's own payment method. The payer gives a cellphone, account or ID number rather than card details, and approves the payment in the Capitec app, so no card number and no banking login is ever entered at checkout. It gets its own button rather than sitting inside the bank list, and it requires Customer Identity Verification.Capitec is the bank this most often applies to; see Payment method identifiers for what needs approval before you build against it, and reach out to support@ozow.com for whether your account is classified this way.
max length13customerCellphoneNumberstringMerchant can provide customer cellphone number for faster login on certain banks. DO NOT include in the hash check string, just ignore instead.
max length10pattern^[0-9]+hashCheckstring requiredSHA512SHA-512 A hashing algorithm. Ozow uses it to sign the values in a request or a notification so you can tell that they arrived unaltered and came from us. Hashing is one-way: the hash cannot be turned back into what produced it.Wikipedia hash used to ensure that certain fields in the message have not been altered after the hash was generated. See Generate the hash check for the field order and a worked example.
max length250
application/xml
siteCodestring requiredA unique code for the site currently in use. A 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. is generated when adding a site in the Ozow merchant admin section.
max length50countryCodestring requiredThe ISO 3166-1 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 user's country. The country code will determine which banks will be displayed to the customer. Please note only South African (ZA) banks are currently supported by Ozow.max length2pattern^[A-Z]+currencyCodestring requiredThe ISO 4217ISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia three-letter code for the transaction currency. Please note only the South African 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, so100.00is one hundred rand. (ZAR) is currently supported by Ozow, so any currency conversion must take place before posting to the Ozow site.max length3pattern^[A-Z]+amountnumber double requiredThe transaction amount. The amount is in the currency specified by the currency codeISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia posted.transactionReferencestring requiredThe merchant's reference for the transaction. This reference can be used to look up the transaction with the
GetTransactionByReferenceoperation.max length50bankReferencestring requiredThe reference that will be pre-populated in the "their reference" field in the customers online banking site. This is the payment reference that appears on the merchant’s bank statement and can be used for recon purposes. Only alphanumeric characters, spaces, and dashes are allowed.
max length20optional1stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional2stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional3stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional4stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50optional5stringOptional field the merchant can post for additional information they would need passed back in the response. These are also stored with the transaction details by Ozow, and can be useful for filtering transactions in the merchant admin section.
max length50customerstringThe customer’s name or identifier.
max length100cancelUrlstring uriThe URL to which the 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. result should be posted to if the customer cancels the payment. This is also the page the customer will be redirected to. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the posted value will be redirected to if the payment is cancelled.
max length150errorUrlstring uriThe URL to which the 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. result should be posted if an error occurs while trying to process the payment. This is also the page the customer will be redirected to. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the posted value will be redirected to if an error occurred while processing the payment.
max length150successUrlstring uriThe URL to which the 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. result should be posted to if the payment is successful. This is also be the page the customer gets redirected to. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the posted value will be redirected to if the payment was successful.
Please note that it is not sufficient to assume that the payment was successful simply because the customer has been redirected back to this page. It is highly recommended that you check the response fields as well as the transaction status using our check transaction status API call.
max length150notifyUrlstring uriThe URL that the notification result should be posted to. The result will post regardless of the outcome of the transaction. This URL can also be set for the applicable merchant site in the merchant admin section. If a value is set in the merchant admin and sent in the post, the notification result will be sent to the posted value. Find out more in the notification response section in step 2.
max length150isTestboolean requiredAccepted values are true or false. Send true to test your request posting and response handling. If set to true you will be redirected to select whether you would like a successful or unsuccessful 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. response sent back.
Please note that notification responses are sent for test transactions and the online banking payment is skipped.
selectedBankIdstring uuidIf the 'SelectedBankId' field is populated by the Merchant, the Customer will be redirected to the Ozow login page of the selected bank. However, if the field is left empty, the Customer will be presented with Ozow bank selection screen.
See Payment method identifiers for the value to send.
bankAccountNumberstringThe bank account number the payment should be made to.
max length20branchCodestringThe branch codeBranch code The six-digit number identifying a South African bank branch, the equivalent of a sort code or a routing number elsewhere. Each bank publishes one universal branch code that works for every account it holds, which is the one to use unless you have been given another. for the bank account.
max length10bankAccountNamestringThe name of the beneficiary account the payment is made into. Letters, digits and spaces only. Required, along with
bankAccountNumber,branchCodeandbankId, whenever any one of them is sent.max length50pattern^[a-zA-Z0-9\s]+$payeeDisplayNamestringThe name shown on the site as the entity being paid (not in banking screens).
max length50expiryDateUtcstringPayment will not be allowed to be made after this date. Date should be UTC and value should be formatted as yyyy-MM-dd HH:mm
max length19allowVariableAmountbooleanAllows the user to change the amount passed through before paying. This option must also be enabled for the site in the merchant admin portal to be used. Accepted values are true or false. DO NOT include false in the hash check string, just ignore instead.
variableAmountMinnumber doubleIf AllowVariableAmount is passed through as true, this will dictate the lowest acceptable amount the user can enter.
variableAmountMaxnumber doubleIf AllowVariableAmount is passed through as true, this will dictate the highest acceptable amount the user can enter.
customerIdentifierstringMerchants classified as high-risk must provide a valid South African identity number. It's important to note that this is an optional field for all other merchants. Capitec PayCapitec Pay Capitec's own payment method. The payer gives a cellphone, account or ID number rather than card details, and approves the payment in the Capitec app, so no card number and no banking login is ever entered at checkout. It gets its own button rather than sitting inside the bank list, and it requires Customer Identity Verification.Capitec is the bank this most often applies to; see Payment method identifiers for what needs approval before you build against it, and reach out to support@ozow.com for whether your account is classified this way.
max length13customerCellphoneNumberstringMerchant can provide customer cellphone number for faster login on certain banks. DO NOT include in the hash check string, just ignore instead.
max length10pattern^[0-9]+hashCheckstring requiredSHA512SHA-512 A hashing algorithm. Ozow uses it to sign the values in a request or a notification so you can tell that they arrived unaltered and came from us. Hashing is one-way: the hash cannot be turned back into what produced it.Wikipedia hash used to ensure that certain fields in the message have not been altered after the hash was generated. See Generate the hash check for the field order and a worked example.
max length250
Responses
application/json
paymentRequestIdstring uuid requiredOzow's unique identifier for the payment request.
max length50urlstring uri requiredGenerated URL that allows payment for the request used to create the payment. You will need 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. the payer to this URL, who upon completion of the payment will be redirected back to your site.
The payment Url you'll receive from the API is dynamic. Please do not hard code it into your integrations as it might change.
max length100errorMessagestringError message generated when validating the request.
max length50
application/xml
paymentRequestIdstring uuid requiredOzow's unique identifier for the payment request.
max length50urlstring uri requiredGenerated URL that allows payment for the request used to create the payment. You will need 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. the payer to this URL, who upon completion of the payment will be redirected back to your site.
The payment Url you'll receive from the API is dynamic. Please do not hard code it into your integrations as it might change.
max length100errorMessagestringError message generated when validating the request.
max length50
API key is missing or invalid.Merchant for site code TSTSTE0001 is deactivatedGuides
- 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.
- Payin test casesThe payments to run before you go live on the Payments API, what each one delivers, and a notification handler that survives all of them.
- Redirect to OzowBuild a redirect payin on the Payments API, the legacy path. Post the payment, redirect the customer, and handle the notification response.
- Embedded iframeLoad the Ozow payment page inside a container on your own checkout with the Ozow SDK, so your customer never leaves your site.
- Embedded modalOpen the Ozow payment page as an overlay on your own checkout with the Ozow SDK, so your customer pays without leaving the page.
- Embedded walletOffer Apple Pay, Google Pay and cards on your own checkout through a secure Ozow iframe, so card data never touches your page. Approved merchants only.