Transaction notification
your notification URLBuild with AI 2 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.
Sent to the notification URLWebhook A URL of yours that Ozow calls when something happens, rather than you polling to find out. The call carries no credential of yours and arrives at a public URL, so authenticate it before acting on it: a hash field on the Payments API, a Svix signature on One API. once a transaction reaches a final status.
The URL comes from the NotifyUrl field on the payment request, or from the site configuration in the merchant admin site. Without one, no notification is sent.
Verify the Hash field before acting on the contents. A notification is an unauthenticated POST to a URL that anyone can call.
Authentication
Ozow sends no credential with this call, so this check is the only thing standing between a real delivery and a stranger’s. Verify the Hash field before acting on the contents: your notification URL is public, and anyone can post to it.
Payload
application/x-www-form-urlencoded
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. sent to Ozow in the request post.
max length50TransactionIdstring uuid requiredThe transaction identifier generated by Ozow.
max length50TransactionReferencestring requiredThe merchant's transaction reference sent in the request post's TransactionReference variable.
max length50Amountnumber double requiredThe transaction amount, always written with two decimal places. That is the form the hash is built from, so use the value exactly as it was posted.
Statusstring requiredThe transaction status. Possible values are:
- Complete - The payment was successful.
- Cancelled - The payment was cancelled.
- Error - An error occurred while processing the payment.
- Abandoned – The payment was abandoned.
- PendingInvestigation – An inconclusive result was received by the bank and the payment needs to be verified manually.
- Pending – The status cannot be determined as yet but will be reposted to the notification URLWebhook A URL of yours that Ozow calls when something happens, rather than you polling to find out. The call carries no credential of yours and arrives at a public URL, so authenticate it before acting on it: a hash field on the Payments API, a Svix signature on One API. as soon as it has been determined. Merchants not using the notification URL will receive a PendingInvestigation status.
max length50Optional1stringOptional fields sent in the request post.
max length50Optional2stringOptional fields sent in the request post.
max length50Optional3stringOptional fields sent in the request post.
max length50Optional4stringOptional fields sent in the request post.
max length50Optional5stringOptional fields sent in the request post.
max length50CurrencyCodestring requiredThe transaction currency codeISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia sent in the request post.max length3pattern^[A-Z]+IsTeststringWhether the transaction was a test transaction, sent as
TrueorFalse. Part of the hash, so use the value exactly as it was posted.max length5StatusMessagestringA message about the status, empty for most transactions. Part of the hash, so an empty value still counts as a field and contributes an empty string.
max length500Hashstring 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 the generate hash section for more details on how to validate the response variables using the hash.
max length128SubStatusstringThe transaction sub status for failed transactions. The value provides an indication as to why the payment failed.
Some examples: • Unclassified – Failure scenario has not been mapped • InsufficientFunds - User did not have sufficient funds available to complete the payment
While there are several sub-statuses, they have not been included here as they are strictly for reporting.
max length50MaskedAccountNumberstringThe masked account number the payment was made from.
If account number is 12 or more digits then the first and last four digits are unmasked e.g. 1234567898765 will be masked as 1234*****8765
If the account number is less than12 digits then the first and last 3 digits are left unmasked e.g. 123456789 will be masked as 123***789
This is not available by default and a request by the merchant must be submitted along with a justification for requiring this information.
max length50BankNamestringThe name of the bank the payment was made from.
max length50SmartIndicatorsstringSome Ozow merchants have requested this information as they use this in their own processes. The can be ignored unless you have a purpose and application for this information. The application of these indicators are for the merchant’s discretion and in isolation do not constitute any action to be taken by the merchant.
The field will contain a pipe delimited list of the following values if they are applicable e.g. HIGH_VALUE | FIRST_OZOW :
- HIGH_VALUE – If a soft limit is configured on the site and the amount paid is higher or equal to the configured limit
- FIRST_OZOW – First time a user has paid using Ozow
- FIRST_MERCHANT – First time a user has paid the merchant using Ozow
- NEW_OZOW – User has paid using Ozow for the first time in the past seven days
- NEW_MERCHANT - User has paid the merchant using Ozow for the first time in the past seven days
max length500
Verify the hash
Ozow sends no credential with this call, so Hash is the only thing that tells you the notification came from Ozow. Recompute it and compare before you act on anything else in the body.
- Concatenate the fields in the table below, in that order. A field with no value contributes an empty string rather than being skipped.
- Append your private key.
- Convert the whole string, your private key included, to lowercase.
- Take the SHA512 of it and write the digest as hexadecimal.
- Compare that against
Hash, ignoring case.
| Position | Field |
|---|---|
| 1 | SiteCode |
| 2 | TransactionId |
| 3 | TransactionReference |
| 4 | Amount, with two decimal places |
| 5 | Status |
| 6 | Optional1 |
| 7 | Optional2 |
| 8 | Optional3 |
| 9 | Optional4 |
| 10 | Optional5 |
| 11 | CurrencyCode |
| 12 | IsTest |
| 13 | StatusMessage |
| 14 | Your private key |
Important
SubStatus, MaskedAccountNumber, BankName and SmartIndicators arrive in the same body and are not part of the hash. Including one of them gives a digest that never matches.
Hash calculator builds this string field by field, so you can compare it against the one your code produces.
Your response
No body.
Guides
- 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.