Get chargeback

Chargebacks API v2
GEThttps://api.mollie.com/v2/payments/*paymentId*/chargebacks/*id*

Retrieve a single chargeback 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 chargebacks list endpoint.

Parameters

Replace paymentId in the endpoint URL by the payment’s ID, and replace id by the chargeback’s ID. For example: /v2/payments/tr_7UhSN1zuXS/chargebacks/chb_n9z0tp.

Response

200 application/hal+json

id

string
The chargeback’s unique identifier, for example chb_n9z0tp.

amount

amount object

The amount charged back by the consumer.

currency

string
An ISO 4217 currency code.

value

string
A string containing the exact amount that was charged back in the given currency.

settlementAmount

amount object|null

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

Note that for chargebacks, the value key of settlementAmount will be negative.

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

currency

string
The settlement currency, an ISO 4217 currency code.

value

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

createdAt

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

reversedAt

datetime
The date and time the chargeback was reversed if applicable, in ISO 8601 format.

paymentId

string
The unique identifier of the payment this chargeback was issued for. For example: tr_7UhSN1zuXS. The full payment object can be retrieved via the payment URL in the _links object.

_links

object

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

self

URL object
The API resource URL of the chargeback itself.

payment

URL object
The API resource URL of the payment this chargeback belongs to.

settlement

URL object
The API resource URL of the settlement this payment has been settled with. Not present if not yet settled.

documentation

URL object
The URL to the chargeback retrieval endpoint documentation.

Example

cURLPHPPythonRubyNode.js
1
2
curl -X GET https://api.mollie.com/v2/payments/tr_WDqYK6vllg/chargebacks/chb_n9z0tp \
   -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"
1
2
3
4
5
6
<?php
$mollie = new \Mollie\Api\MollieApiClient();
$mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM");

$payment = $mollie->payments->get("tr_WDqYK6vllg");
$chargeback = $payment->getChargeback("chb_n9z0tp");
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')
chargeback = mollie_client.payment_chargebacks.on(payment).get('chb_n9z0tp')
1
2
3
4
We don't have a Ruby code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation
1
2
3
4
We don't have a Node.js code example for this API call yet.

If you have some time to spare, feel free to open a pull request at:
https://github.com/mollie/api-documentation

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": "chargeback",
    "id": "chb_n9z0tp",
    "amount": {
        "currency": "USD",
        "value": "43.38"
    },
    "settlementAmount": {
        "currency": "EUR",
        "value": "-35.07"
    },
    "createdAt": "2018-03-14T17:00:52.0Z",
    "reversedAt": null,
    "paymentId": "tr_WDqYK6vllg",
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/payments/tr_WDqYK6vllg/chargebacks/chb_n9z0tp",
            "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/chargebacks-api/get-chargeback",
            "type": "text/html"
        }
    }
}