List Refunds

The API also has the facility of you to query historical refunds data.

GetRefunds

You can use the API to query your refunds, filtering by date and status (only refunds for the authenticated Merchant site will be returned).

Url: /secure/refunds/getrefunds

Method: GET

Headers: See common headers

URL Params

TypeDescription
RefundDateThe date of the refunds you would like to be returned.
StatusThe status of the refunds you would like to be returned.

Data Params: N/A

Response Object

NameTypeDescription
idGuidThe identifier for the refund.
createdDateDateTimeThe date the refund was created.
createdDateUtcDateTimeThe UTC date the refund was created.
merchantCodeStringCorresponding merchant code of the refund.
siteCodeStringCorresponding site code of the refund.
siteNameStringCorresponding site name of the refund.
bankToNameStringBank the refund was sent to.
currencyCodeStringRefund currency.
amountDecimalRefund amount.
statementReferenceStringBank reference of the refund for the payer.
statusStringRefund status.
toAccountStringAccount number refund was sent to.
paymentDateStringPayment date of the refund.
transactionReferenceStringReference of the transaction which was refunded.
customerStringRefunded transaction customer.
lastEventStringMost recent log activity of the refund.
refundCompletedDateStringThe date the refund was completed.
createdByStringName of the user who created the refund.

Request example

    POST https://api.ozow.com/secure/refunds/submit HTTP/1.1
    Authorization: Bearer J4lnLIZtJSc0Rf...Zunskttzl3MdGEMIDArZ4Yp6QTw6_Z4uDkAJN8Y
    Accept: application/json
    Content-Type: application/json
    [
        {
            "refundDate":"2018/02/12",
            "status":"Returned"
        }
    ]

Response example


    [
        {
            "id": "b2d9ba84-a451-4f03-aae4-8cd3c90154fe",
            "createdDate": "2018-02-12T13:34:19.057",
            "createdDateUtc": "2018-02-12T11:34:19.12",
            "merchantCode": "TestMerch",
            "siteCode": "TSTSTE0001",
            "siteName": "test site",
            "bankToName": "Standard Bank New",
            "currencyCode": "ZAR",
            "amount": 150.05,
            "statementReference": "RF test site",
            "status": "Returned",
            "toAccount": "123456789",
            "paymentDate": null,
            "transactionReference": "TTS12C7D6ac30980e",
            "customer": "Test Customer",
            "lastEvent": null,
            "refundCompletedDate": null,
            "createdBy": "Mitchan Adams"
        },
        {
            "id": "25716f65-7685-4cce-b3e2-60478490c0dc",
            "createdDate": "2018-02-12T13:48:12.541",
            "createdDateUtc": "2018-02-12T11:48:12.541",
            "merchantCode": "TestMerch",
            "siteCode": "TSTSTE0001",
            "siteName": "test site",
            "bankToName": "Standard Bank New",
            "currencyCode": "ZAR",
            "amount": 5000.00,
            "statementReference": "RF test site",
            "status": "Returned",
            "toAccount": "123456789",
            "paymentDate": null,
            "transactionReference": "TTS12C7D6ac30980e",
            "customer": "Test Customer",
            "lastEvent": null,
            "refundCompletedDate":  "2018-02-12T13:48:12.541",
            "createdBy": "Mitchan Adams"
        }
    ]

GetRefund

You can use the API to query a refund using the Ozow refund identifier.

Url: /secure/refunds/getrefund

Method: GET

Headers: See common headers

URL Params

TypeDescription
RefundIdOzow's identifier for the refund. This identifier is passed back to the merchant in the SubmitRefunds response’s RefundId field.

Data Params: N/A

Response Object

Refund - Ozow's identifier for the refund. This identifier is passed back to the merchant in the SubmitRefunds response’s RefundId field.


GetRefundsByTransactionId

You can use the API to query all refunds done against a payment transaction using the Ozow transaction identifier.

Url: /secure/refunds/getrefundsbytransactionid

Method: GET

Headers: See common headers

URL Params

TypeDescription
TransactionIdOzow's identifier for original payment transaction. This is passed back to the merchant in the payment redirect and notification response’s TransactionId field.

Data Params: N/A

Response Object

Refund[] - A successful call will return an array of refund objects. The refund object is described below.

Refund object

This is the object referred to in the response of the two API calls above.

NameTypeDescription
idGuidThe identifier for the refund.
createdDateDateTimeThe date the refund was created.
createdDateUtcDateTimeThe UTC date the refund was created.
merchantCodeStringCorresponding merchant code of the refund.
siteCodeStringCorresponding site code of the refund.
siteNameStringCorresponding site name of the refund.
bankToNameStringBank the refund was sent to.
currencyCodeStringRefund currency.
amountDecimalRefund amount.
statementReferenceStringBank reference of the refund for the payer.
statusStringRefund status.
toAccountStringAccount number refund was sent to.
paymentDateStringPayment date of the refund.
transactionReferenceStringReference of the transaction which was refunded.
customerStringRefunded transaction customer.
lastEventStringMost recent log activity of the refund.
refundCompletedDateStringThe date the refund was completed.
createdByStringName of the user who created the refund.

For more information on refunds, visit our site here.