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
Type | Description |
---|---|
RefundDate | The date of the refunds you would like to be returned. |
Status | The status of the refunds you would like to be returned. |
Data Params: N/A
Response Object
Name | Type | Description |
---|---|---|
id | Guid | The identifier for the refund. |
createdDate | DateTime | The date the refund was created. |
createdDateUtc | DateTime | The UTC date the refund was created. |
merchantCode | String | Corresponding merchant code of the refund. |
siteCode | String | Corresponding site code of the refund. |
siteName | String | Corresponding site name of the refund. |
bankToName | String | Bank the refund was sent to. |
currencyCode | String | Refund currency. |
amount | Decimal | Refund amount. |
statementReference | String | Bank reference of the refund for the payer. |
status | Integer | Refund status. See possible values. |
toAccount | String | Account number refund was sent to. |
paymentDate | String | Payment date of the refund. |
transactionReference | String | Reference of the transaction which was refunded. |
customer | String | Refunded transaction customer. |
lastEvent | String | Most recent log activity of the refund. |
refundCompletedDate | String | The date the refund was completed. |
createdBy | String | Name of the user who created the refund. |
isRtc | Bool | True/False for refunds paid via RTC |
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": 5,
"toAccount": "123456789",
"paymentDate": null,
"transactionReference": "TTS12C7D6ac30980e",
"customer": "Test Customer",
"lastEvent": null,
"refundCompletedDate": null,
"createdBy": "Mitchan Adams",
"isRtc": true
},
{
"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": 1,
"toAccount": "123456789",
"paymentDate": null,
"transactionReference": "TTS12C7D6ac30980e",
"customer": "Test Customer",
"lastEvent": null,
"refundCompletedDate": "2018-02-12T13:48:12.541",
"createdBy": "Mitchan Adams",
"isRtc": false
}
]
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
Type | Description |
---|---|
RefundId | Ozow'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. See response object.
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
Type | Description |
---|---|
TransactionId | Ozow'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.
Name | Type | Description |
---|---|---|
id | Guid | The identifier for the refund. |
createdDate | DateTime | The date the refund was created. |
createdDateUtc | DateTime | The UTC date the refund was created. |
merchantCode | String | Corresponding merchant code of the refund. |
siteCode | String | Corresponding site code of the refund. |
siteName | String | Corresponding site name of the refund. |
bankToName | String | Bank the refund was sent to. |
currencyCode | String | Refund currency. |
amount | Decimal | Refund amount. |
statementReference | String | Bank reference of the refund for the payer. |
status | Integer | Refund status. See possible values. |
toAccount | String | Account number refund was sent to. |
paymentDate | String | Payment date of the refund. |
transactionReference | String | Reference of the transaction which was refunded. |
customer | String | Refunded transaction customer. |
lastEvent | String | Most recent log activity of the refund. |
refundCompletedDate | String | The date the refund was completed. |
createdBy | String | Name of the user who created the refund. |
isRtc | Bool | True/False for refunds paid via RTC |
For more information on refunds, visit our site here.
Updated 7 months ago