Refund notification
your notification URLBuild 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.
- 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.
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. given on the refund request, once the refund has either completed or failed.
Verify the hash field before acting on the contents. Concatenate the notification fields in the order they appear, excluding isRtc and hash, append your private key, lowercase the result, and compare a 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 of it against the value received.
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
RefundIdstring uuid requiredThe refund identifier.
TransactionIdstring uuid requiredThe transaction identifier of the transaction that is being refunded.
CurrencyCodestring requiredThe refund currency. Will always be the same as the amount in the transaction.
max length3Amountnumber double requiredThe refund amount, in the currency the currency codeISO 4217 The three-letter currency codes, such as
ZARfor the South African rand. Always uppercase.Wikipedia names. Written with two decimal places, which is the form the hash is built from.IsRtcstring requiredAn indication of whether RTCReal-Time Clearing Payments that clear immediately rather than waiting for a batch. A batch run settles at set times through the day; a Real-Time Clearing payment moves the funds between the two bank accounts as it is made, so the recipient can rely on them straight away.PayInc was used to pay the refund.
Statusstring requiredThe refund status. Sent as the name, not as a number, because the notification is form encoded and the status is written out in full.
values"Pending""Submitted""Complete""Failed""Cancelled""Returned""PendingInvestigation""Invalid""Error"BankNamestring requiredThe name of the bank the refund was paid to.
max length50AccountNumberstring requiredThe masked account number payment was made to. The hash is built from the masked value, so hash what you received rather than the number you sent.
max length50StatusMessagestringMessage regarding the status of the refund. This field will not always have a value.
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.
max length128
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 | RefundId |
| 2 | TransactionId |
| 3 | CurrencyCode |
| 4 | Amount, with two decimal places |
| 5 | Status |
| 6 | BankName |
| 7 | AccountNumber |
| 8 | StatusMessage |
| 9 | Your private key |
Important
IsRtc arrives in the same body and is not part of the hash. Including it 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.