Submit refund
Try it
Bodyapplication/json
Request sample
curl -X POST 'https://api.ozow.com/secure/refunds/submit' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '[
{
"transactionId": "00000000-0000-0000-0000-000000000000",
"amount": 20.44,
"refundReason": "<refundReason>",
"notifyUrl": "https://example.com/notifyurl",
"hashCheck": "<hashCheck>",
"isRtc": false
}
]'Response example
Built from the response schema. Values are placeholders, not real data.
https://api.ozow.com/secure/refunds/submitProductionBuild 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.
Submit refunds to Ozow for processing.
Authentication
- Bearer token
The token generated by the
Get API tokenoperation. The same token is used for every request until it expires.
Request body
An array of refund requests.
application/json
application/x-www-form-urlencoded
transactionIdstring uuid requiredThe transaction identifier. This is the identifier for the payment that was originally processed on Ozow.
amountnumber double requiredThe amount that needs to be refunded. This can be less than the original transaction amount but not more.
refundReasonstringThe reason for the refund.
max length500notifyUrlstring uriThe URL Ozow will send a notification to once the refund has been finalised.
max length500hashCheckstring 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 proving the request has not been altered after you generated it. Concatenate four fields in this order, with no separator, then append your private key:
transactionIdamount, formatted with two decimal places, so100.00refundReasonnotifyUrl
Hash the result with SHA512 and send the digest as lowercase hexadecimal.
Unlike the payment request hash, do not convert the concatenated string to lowercase before hashing. Refunds hash the string exactly as you built it, so the case of your reason and your notify URL matters. Only the digest is compared case insensitively.
max length150isRtcbooleanWhether the refund should be processed as an 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 refund.
defaultfalse
Responses
application/json
refundIdstring uuid requiredThe identifier for the refund that was created. No identifier is returned if there was an error creating the refunds.
transactionIdstring uuid requiredThe transaction identifier. This will correspond to one of the transaction identifiers passed through in the request.
refundAmountstring requiredThe refund amount.
errorsarray of stringValidation errors for the specific refund.
application/xml
refundIdstring uuid requiredThe identifier for the refund that was created. No identifier is returned if there was an error creating the refunds.
transactionIdstring uuid requiredThe transaction identifier. This will correspond to one of the transaction identifiers passed through in the request.
refundAmountstring requiredThe refund amount.
errorsarray of stringValidation errors for the specific refund.
There was an error processing your requestAPI key is missing or invalid.