Refunds

This endpoint allows you to list your refunds

get/refunds

Request

  • The document declares no server URL.
  • Auth
    none declared. Required headers: MerchantId, ApiKey, Environment

Query parameters

fromDatestring
Example:2020-10-15T12:09:49.355Z

Start of the period, in UTC, inclusive. Follows the Datetime ISO. Applied together with toDate.

toDatestring
Example:2020-10-16T12:09:49.355Z

End of the period, in UTC, exclusive. Follows the Datetime ISO. Applied together with fromDate.

filterBy'createdAt' | 'updatedAt'
Example:createdAt

Date the list is ordered on (the dashboard list also filters from/to on it). Defaults to createdAt.

status'created' | 'pending' | 'pending_manual' | 'failed' | 'successful'
Example:successful

Only the refunds in this status.

gatewayIdstring

Only the refunds processed through this gateway.

idstring
Example:7

Only the refund with this id.

pagenumber
Example:2

The page number in the returned data. The default value is 1. Do use with 'perPage' query parameter to paginate properly.

perPagenumber
Example:5

The maximum number of results that will be return. The default value is 10. Do use with 'page' query parameter to paginate properly.

Headers

MerchantIdstring required

Your merchant ID. This information is available in our dashboard. If you don't have access to it, please reach the Support team.

ApiKeystring required

Your api key. To create a key, please get into our dashboard. If you don't have access to it, please reach the Support team.

Environment'live' | 'sandbox' required

Allow you to choose between the sandbox mode to perform some tests or the live mode for real world transactions.

Response

totalItemsnumber required

Total number of refunds matching the filters

currentPagenumber required

Current page number

countPerPagenumber required

Number of refunds per page

Example response

{
  "data": [
    {
      "id": 1,
      "transactionId": "tr_z1urYtVFgEebtcj8fxp4v",
      "status": "successful",
      "amount": 1000,
      "currency": "XOF"
    }
  ],
  "totalItems": 42,
  "currentPage": 1,
  "countPerPage": 10
}

Changes