Get payment refund

Refunds API v2
GEThttps://api.mollie.com/v2/payments/*paymentId*/refunds/*id*

Retrieve a single payment refund by its ID. Note the payment ID is required as well.

If you do not know the original payment’s ID, you can use the List refunds.

Note

Trying to retrieve a canceled refund will result in a 404 response.

Parameters

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

Access token parameters

If you are using organization access tokens or are creating an OAuth app, you can enable test mode through the testmode query string parameter.

testmodebooleanoptional

Response

200 application/hal+json

resourcestring
Indicates the response contains a refund object. Will always contain refund for this endpoint.
idstring
The refund’s unique identifier, for example re_4qqhO89gsT.
amountamount object

The amount refunded to your customer with this refund.

Show child parameters

currencystring
An ISO 4217 currency code. The currencies supported depend on the payment methods that are enabled on your account.
valuestring
A string containing the exact amount that was refunded in the given currency.
settlementIdstringoptional
The identifier referring to the settlement this payment was settled with. For example, stl_BkEjN2eBb. This field is omitted if the refund is not settled (yet).
settlementAmountamount objectoptional

This optional field will contain the approximate amount that will be deducted from your account balance, converted to the currency your account is settled in. It follows the same syntax as the amount property.

For refunds, the value key of settlementAmount will be negative.

Any amounts not settled by Mollie will not be reflected in this amount, e.g. PayPal refunds.

Queued refunds in non-EUR currencies will not have a settlement amount until they become pending.

Please note that this amount might be recalculated and changed when the status of the refund changes. We suggest using the List balance transactions endpoint instead to get more accurate settlement amounts for your refunds.

Show child parameters

currencystring
The settlement currency, an ISO 4217 currency code.
valuestring

A string containing the exact amount that was deducted for the refund from your account balance in the settlement currency. Note that this will be negative.

If the refund is queued and in a different currency than the settlement currency, the settlement amount will be null as the exchange rates may change until the refund is finally executed.

descriptionstring
The description of the refund that may be shown to your customer, depending on the payment method used.
metadatamixed
The optional metadata you provided upon refund creation. Metadata can for example be used to link an bookkeeping ID to a refund.
statusstring

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

For a full overview, see Refund statuses.

linesarrayoptional

An array of order line objects as described in Get order.

The lines will show the quantity, discountAmount, vatAmount and totalAmount refunded. If the line was partially refunded, these values will be different from the values in response from the Get order endpoint.

Only available if the refund was created via the Create order refund endpoint.

paymentIdstring
The unique identifier of the payment this refund was created for. For example: tr_7UhSN1zuXS. The full payment object can be retrieved via the payment URL in the _links object.
orderIdstringoptional

The unique identifier of the order this refund was created for. For example: ord_8wmqcHMN4U. Not present if the refund was not created for an order.

The full order object can be retrieved via the order URL in the _links object.

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

An object with several URL objects relevant to the refund. Every URL object will contain an href and a type field.

Show child parameters

selfURL object
The API resource URL of the refund itself.
paymentURL object
The API resource URL of the payment the refund belongs to.
settlementURL objectoptional
The API resource URL of the settlement this payment has been settled with. Not present if not yet settled.
orderURL objectoptional
The API resource URL of the order the refund belongs to. Not present if the refund does not belong to an order.
documentationURL object
The URL to the refund retrieval endpoint documentation.

Mollie Connect response parameters

routingReversalsobjectoptional

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/payments/tr_WDqYK6vllg/refunds/re_4qqhO89gsT \
   -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");
$refund = $mollie->payments->get("tr_WDqYK6vllg")->getRefund("re_4qqhO89gsT");
1
2
3
4
5
6
7
from mollie.api.client import Client

mollie_client = Client()
mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM")

payment = mollie_client.payments.get("tr_WDqYK6vllg")
refund = payment.refunds.get("re_4qqhO89gsT")
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require 'mollie-api-ruby'

Mollie::Client.configure do |config|
  config.api_key = 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM'
end

refund = Mollie::Payment::Refund.get(
  're_4qqhO89gsT',
  payment_id: 'tr_WDqYK6vllg'
)
1
2
3
4
5
6
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

const refund = await mollieClient.paymentRefunds.get('re_4qqhO89gsT', {
  paymentId: 'tr_WDqYK6vllg'
});

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
    "resource": "refund",
    "id": "re_4qqhO89gsT",
    "amount": {
        "currency": "EUR",
        "value": "5.95"
    },
    "status": "pending",
    "createdAt": "2018-03-14T17:09:02.0Z",
    "description": "Order #33",
    "metadata": {
         "bookkeeping_id": 12345
    },
    "paymentId": "tr_WDqYK6vllg",
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg/refunds/re_4qqhO89gsT",
            "type": "application/hal+json"
        },
        "payment": {
            "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/refunds-api/get-payment-refund",
            "type": "text/html"
        }
    }
}