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.

Access token parameters

If you are using organization access tokens or are creating an OAuth app, you have to specify which profile you are retrieving a chargeback for using the profileId parameter. Organizations can have multiple profiles for each of their websites. See Profiles API for more information.

profileIdstringrequired for access tokens

Response

200 application/hal+json

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

The amount charged back by the consumer.

Show child parameters

currencystring
An ISO 4217 currency code.
valuestring
A string containing the exact amount that was charged back in the given currency.
settlementAmountamount object

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.

Show child parameters

currencystring
The settlement currency, an ISO 4217 currency code.
valuestring
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.
createdAtdatetime
The date and time the chargeback was issued, in ISO 8601 format.
reasonobject

Reason for the chargeback as given by the bank.

Note

This field will only be returned for chargebacks where direct debit was used as the original payment method.

Show child parameters

codestring
Bank code of the chargeback reason.
descriptionstring
Detailed description of the reason.
reversedAtdatetime
The date and time the chargeback was reversed if applicable, in ISO 8601 format.
paymentIdstring
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.
_linksobject

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

Show child parameters

selfURL object
The API resource URL of the chargeback itself.
paymentURL object
The API resource URL of the payment this chargeback belongs to.
settlementURL objectoptional
The API resource URL of the settlement this payment has been settled with. Not present if not yet settled.
documentationURL 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
 5
 6
 7
 8
 9
10
require 'mollie-api-ruby'

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

chargeback = Mollie::Payment::Chargeback.get(
  'chb_n9z0tp',
  payment_id: 'tr_WDqYK6vllg'
)
1
2
3
4
5
6
7
8
9
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async ()  => {
  const chargeback = await mollieClient.payments_chargebacks.get(
    'chb_n9z0tp',
    { 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
33
34
35
36
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",
     "reason": {
       "code": "AC01",
       "description": "Account identifier incorrect (i.e. invalid IBAN)"
     },
    "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-payment-chargeback",
            "type": "text/html"
        }
    }
}