Ozow Hub
POST Ozow sendsyour notification URL
Build 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.
    View package
  • 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.
    View package

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

  • SiteCode string required

    The 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 length50
  • TransactionId string uuid required

    The transaction identifier generated by Ozow.

    max length50
  • TransactionReference string required

    The merchant's transaction reference sent in the request post's TransactionReference variable.

    max length50
  • Amount number double required

    The 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.

  • Status string required

    The transaction status. Possible values are:

    1. Complete - The payment was successful.
    2. Cancelled - The payment was cancelled.
    3. Error - An error occurred while processing the payment.
    4. Abandoned – The payment was abandoned.
    5. PendingInvestigation – An inconclusive result was received by the bank and the payment needs to be verified manually.
    6. 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 length50
  • Optional1 string

    Optional fields sent in the request post.

    max length50
  • Optional2 string

    Optional fields sent in the request post.

    max length50
  • Optional3 string

    Optional fields sent in the request post.

    max length50
  • Optional4 string

    Optional fields sent in the request post.

    max length50
  • Optional5 string

    Optional fields sent in the request post.

    max length50
  • CurrencyCode string required

    The transaction currency codeISO 4217 The three-letter currency codes, such as ZAR for the South African rand. Always uppercase.Wikipedia sent in the request post.

    max length3pattern^[A-Z]+
  • IsTest string

    Whether the transaction was a test transaction, sent as True or False. Part of the hash, so use the value exactly as it was posted.

    max length5
  • StatusMessage string

    A 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 length500
  • Hash string required

    SHA512SHA-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 length128
  • SubStatus string

    The 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 length50
  • MaskedAccountNumber string

    The 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 length50
  • BankName string

    The name of the bank the payment was made from.

    max length50
  • SmartIndicators string

    Some 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.

  1. Concatenate the fields in the table below, in that order. A field with no value contributes an empty string rather than being skipped.
  2. Append your private key.
  3. Convert the whole string, your private key included, to lowercase.
  4. Take the SHA512 of it and write the digest as hexadecimal.
  5. Compare that against Hash, ignoring case.
PositionField
1SiteCode
2TransactionId
3TransactionReference
4Amount, with two decimal places
5Status
6Optional1
7Optional2
8Optional3
9Optional4
10Optional5
11CurrencyCode
12IsTest
13StatusMessage
14Your 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

200 Acknowledged. Return this once you have stored the notification.

No body.

Guides