Lifecycle
The diagram below shows how the HUB2 API processes a refund.Refunds
The Refunds API lets merchants request the refund of a successful transfer. A refund has one of the following statuses:created, pending, pending_manual (the refund requires a manual action before it completes), successful or failed.
Creating a refund
HUB2 API reference - Create a refund Creating a refund requires a single call to the dedicated endpoint, with the ID of the transfer to refund in theid field.
Sample request:
201 Created and returns the refund ID (id). The refund is processed asynchronously, and webhooks notify you of its status changes.
When contacting HUB2 support about a refund, provide the refund ID, not the transfer ID.
Restrictions
- Only successful transfers can be refunded. Otherwise, the API responds with
409 Conflict. - A transfer can only be refunded once. A second request responds with
409 Conflict. - The refund amount is always the full amount of the original transfer.
Retrieving refund details
HUB2 API reference - Get refund details To retrieve a refund, call the dedicated endpoint with the refund ID obtained when the refund was created (see previous step). This endpoint returns the full details of a refund, including its current status. This endpoint, like every HUB2 API endpoint, is rate limited: when it is called too often, the HUB2 API responds withHTTP 429 Too Many Requests.
Documentation about rate limits can be found here.
Documentation about webhooks can be found here.
List refunds
HUB2 API reference - List refunds To fetch a list of refunds, use the dedicated endpoint. Several query parameters (see below) filter the results. Sample request:fromDate: start of the creation date range, here2023-01-01T00:00:00.000Z.toDate: end of the creation date range, here2023-01-01T12:00:00.000Z. The date filter only applies when bothfromDateandtoDateare set.pageandperPage: navigation through the result pages.perPagedefaults to10and cannot exceed100.
status query parameter filters refunds by status.
By default, when no filter is set, this endpoint returns the 10 most recent refunds, ordered by creation date, descending.
Pagination
This endpoint is paginated. Unlike the transfers list, the pagination details are returned in the response body, not in aContent-Range header:
toDate is in the future).