List chargebacks

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

Retrieve all received chargebacks. If the payment-specific endpoint is used, only chargebacks for that specific payment are returned.

The results are paginated. See pagination for more information.

Parameters

When using the payment-specific endpoint, replace paymentId in the endpoint URL by the payment’s ID, for example tr_7UhSN1zuXS.

fromstringoptional
Used for pagination. Offset the result set to the chargeback with this ID. The chargeback with this ID is included in the result set as well.
limitintegeroptional
The number of chargebacks to return (with a maximum of 250).

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 chargebacks 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

countinteger
The number of chargebacks found in _embedded.
_embeddedobject

The object containing the queried data.

Hide child parameters

chargebacksarray
An array of chargeback objects as described in Get chargeback.
_linksobject

Links related to the lists of chargebacks. Every URL object will contain an href and a type field.

Show child parameters

selfobject
The URL to the current set of chargebacks.
documentationobject
The URL to the chargebacks list endpoint documentation.

Example

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

// List chargebacks for a single payment
$payment = $mollie->payments->get("tr_7UhSN1zuXS");
$chargebacks = $payment->chargebacks();

// List chargebacks across all payments on the payment profile
// (For all chargebacks on the organizations, use an OAuth or Organization access token.)
$all_chargebacks = $mollie->chargebacks->page();
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')
chargebacks = payment.chargebacks
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
require 'mollie-api-ruby'

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

# List chargebacks for a single payment
payment = Mollie::Payment.get('tr_WDqYK6vllg')
chargebacks = payment.chargebacks

# List chargebacks across all payments on the payment profile
# (For all chargebacks on the organizations, use an OAuth or Organization access token.)
chargebacks = Mollie::Chargeback.all
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async () => {
  // List chargebacks for a single payment
  let chargebacks = await mollieClient.payments_chargebacks.list({ paymentId: 'tr_WDqYK6vllg' });

  // List chargebacks across all payments on the payment profile
  // (For all chargebacks on the organizations, use an OAuth or Organization access token.)
  chargebacks = await mollieClient.chargebacks.list();
})();

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
40
41
42
43
44
45
46
47
48
49
50
51
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
    "count": 3,
    "_embedded": {
        "chargebacks": [
            {
                "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"
                    }
                }
            },
            { },
            { }
        ]
    },
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS/chargebacks",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/chargebacks-api/list-chargebacks",
            "type": "text/html"
        }
    }
}