Get refund¶
Warning
The v1 API has been deprecated. The v1 API will be supported for the foreseeable future, at least until July 2023. However, new features will only be added to the v2 API.
The documentation for retrieving refunds in the new v2 API can be found here. For more information on the v2 API, refer to our v2 migration guide.
GET
https://api.mollie.com/v1/payments/*paymentId*/refunds/*id*
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 list 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
.
Access token parameters¶
If you are creating an app with Mollie Connect, the testmode
query string parameter
is also available.
true
to get a refund made in test mode. If you omit this parameter, you can only retrieve live mode
refunds.Response¶
200
application/json
id
stringre_4qqhO89gsT
.payment
objectThe original payment, as described in Get payment. In the payment object, note the following refund related fields.
amountRefunded
decimalamountRemaining
decimalamount
decimaldescription
stringstatus
stringSince refunds may not be instant for certain payment methods, the refund carries a status field.
For a full overview, see Refund statuses.
refundedDatetime
datetimeExample¶
Request¶
1 2 | curl -X GET https://api.mollie.com/v1/payments/tr_WDqYK6vllg/refunds/re_4qqhO89gsT \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
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 33 34 35 36 37 38 39 | HTTP/1.1 200 OK Content-Type: application/json { "id": "re_4qqhO89gsT", "payment": { "resource": "payment", "id": "tr_WDqYK6vllg", "mode": "test", "createdDatetime": "2018-03-14T07:58:33.0Z", "status": "refunded", "amount": "35.07", "amountRefunded": "5.95", "amountRemaining": "54.12", "description": "Order #33", "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_NL", "links": { "webhookUrl": "https://webshop.example.org/payments/webhook", "redirectUrl": "https://webshop.example.org/order/33/", "refunds": "https://api.mollie.com/v1/payments/tr_WDqYK6vllg/refunds" } }, "amount": "5.95", "status": "pending", "refundedDatetime": "2018-03-14T17:00:50.0Z", "description": "Refund of order", "links": { "self": "https://api.mollie.com/v1/payments/tr_WDqYK6vllg/refunds/re_4qqhO89gsT" } } |