Get payment refund
Refunds API

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

Retrieve a single refund by its ID. Note the original payment's ID is needed as well.

If you do not know the original payment's ID, you can use the refunds top level endpoint.

Parameters

Replace paymentId in the endpoint URL by the payment's ID, and replace id by the refund's ID. For example: /v1/payments/tr_7UhSN1zuXS/refunds/re_4qqhO89gsT.

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
id
string

The refund's unique identifier, for example re_4qqhO89gsT.

payment
object

The original payment, as described in Get payment. In the payment object, note the following refund related fields.

amountRefunded
decimal

The total amount in EURO that is already refunded. For some payment methods, this amount may be higher than the payment amount, for example to allow reimbursement of the costs for a return shipment to the consumer.

amountRemaining
decimal

The remaining amount in EURO that can be refunded.

amount
decimal

The amount refunded to the consumer with this refund.

status
string

Since refunds may be delayed for certain payment methods, the refund carries a status field.

Possible values:

  • queued The refund will be processed once you have enough balance. The refund may be cancelled.
  • pending The refund will be processed soon (usually the next business day). The refund may be cancelled.
  • processing The refund is being processed. Cancellation is no longer possible.
  • refunded The refund has been paid out to the consumer.
  • failed The refund has failed during processing.
refundedDatetime
datetime | null

The date and time the refund was issued, in ISO 8601 format.

Example

Request code

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

    $refund = $mollie->payments_refunds->withParentId("tr_WDqYK6vllg")
        ->get("re_4qqhO89gsT");
}
catch (Mollie_API_Exception $e)
{
    echo "API call failed: " . $e->getMessage();
}

Response

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

{
    "id": "re_4qqhO89gsT",
    "payment": {
        "resource": "payment",
        "id": "tr_WDqYK6vllg",
        "mode": "test",
        "createdDatetime": "2017-12-14T21:22:39.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-12-16T06:24:56.0Z"
}