List refunds
Refunds API

GET
https://api.mollie.nl/v1/refunds
Authentication: API keys OAuth access tokens

Retrieve all refunds for current payment profile (API keys) or the organization (OAuth). Listing the refunds can be done without knowing anything about the payments.

A refund is always made in relation to a payment. Therefore several refunds can be made per payment. Listing all refunds per payment, getting a specific refund, creating and canceling a refund are collected under the Payments API.

Parameters

offset
integer

Optional – The number of objects to skip.

count
integer

Optional – The number of objects to return (with a maximum of 250).

Mollie Connect/OAuth parameters

If you're creating an app with Mollie Connect/OAuth, the following parameters are also available. With the profileId parameter, you can specify which profile you want to look at when getting a refund. Organizations can have multiple profiles for each of their websites. See Profiles API for more.

profileId
string

Optional – The payment profile's unique identifier, for example pfl_3RkSN1zuPE.

testmode
boolean

Optional – Set this to true to only consider refunds made in testmode.

Includes

Some endpoints allow you to indicate if you want more information to be included in the API response via the include querystring parameter.

  • No includes supported for this endpoint.

Response

200
application/json; charset=utf-8
totalCount
integer

The total number of objects available.

offset
integer

The number of skipped objects as requested.

count
integer

The number of objects found in data, which is either the requested number (with a maximum of 250) or the default number.

data
array

A list of refunds as described in Get refund.

links
object

Optional – Links to help navigate through the lists of objects, based on the given offset.

previous
string | null

Optional – The previous set of objects, if available.

next
string | null

Optional – The next set of objects, if available.

first
string | null

Optional – The first set of objects, if available.

last
string | null

Optional – The last set of objects, if available.

Example

Request code

require_once 'Mollie/API/Autoloader.php';
try
{
    $mollie = new Mollie_API_Client;
    $mollie->setAccessToken('access_Wwvu7egPcJLLJ9Kb7J632x8wJ2zMeJ');

    $refund = $mollie->refunds->all();
}
catch (Mollie_API_Exception $e)
{
    echo "API call failed: " . $e->getMessage();
}

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "totalCount": 3,
    "offset": 0,
    "count": 3,
    "data": [
        {
            "id": "re_4qqhO89gsT",
            "payment": {
                "id": "tr_WDqYK6vllg",
                "mode": "test",
                "createdDatetime": "2017-10-17T17:13:43.0Z",
                "status": "refunded",
                "amount": "35.07",
                "amountRefunded": "5.95",
                "amountRemaining": "54.12",
                "description": "Order",
                "method": "ideal",
                "metadata": {
                    "order_id": "33"
                },
                "details": {
                    "consumerName": "Hr E G H K\u00fcppers en\/of MW M.J. K\u00fcppers-Veeneman",
                    "consumerAccount": "NL53INGB0654422370",
                    "consumerBic": "INGBNL2A"
                },
                "locale": "nl",
                "links": {
                    "webhookUrl": "https://webshop.example.org/payments/webhook",
                    "redirectUrl": "https://webshop.example.org/order/33/",
                    "refunds": "https://api.mollie.nl/v1/payments/tr_WDqYK6vllg/refunds"
                }
            },
            "amount": "5.95",
            "refundedDatetime": "2017-10-19T23:13:51.0Z"
        },
        { ... },
        { ... }
    ]
}