List customer payments

Customers API v2
GEThttps://api.mollie.com/v2/customers/*customerId*/payments

Retrieve all payments linked to the customer.

Parameters

Replace customerId in the endpoint URL by the customer’s ID, for example cst_8wmqcHMN4U.

This endpoint accepts the same parameters as the List payments endpoint.

Access token parameters

If you are using organization access tokens or are creating an OAuth app, the only mandatory extra parameter is the profileId parameter. With it, you can specify which profile the payment belongs to. Organizations can have multiple profiles for each of their websites. See Profiles API for more information.

profileId

string
required
The website profile’s unique identifier, for example pfl_3RkSN1zuPE.

testmode

boolean
optional
Set this to true to get payments made in test mode. If you omit this parameter, you can only retrieve live mode payments.

Response

200 application/hal+json

This endpoint returns results in the same format as the List payments endpoint.

Example

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

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

payments = Mollie::Customer::Payment.all(customer_id: 'cst_8wmqcHMN4U')
1
2
3
4
5
6
const { createMollieClient } = require('@mollie/api-client');
const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async () => {
  const customerPayments = await mollieClient.customers_payments.list({ customerId: 'cst_8wmqcHMN4U' });
})();
1
2
3
4
We don't have a Python 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
HTTP/1.1 200 OK
Content-Type: application/hal+json

{
    "count": 5,
    "_embedded": {
        "payments": [
            {
                "resource": "payment",
                "id": "tr_7UhSN1zuXS",
                "mode": "test",
                "createdAt": "2018-02-12T11:58:35.0Z",
                "expiresAt": "2018-02-12T12:13:35.0Z",
                "status": "open",
                "isCancelable": false,
                "amount": {
                    "value": "75.00",
                    "currency": "GBP"
                },
                "description": "test",
                "method": "ideal",
                "metadata": null,
                "details": null,
                "profileId": "pfl_QkEhN94Ba",
                "customerId": "cst_kEn1PlbGa",
                "redirectUrl": "https://webshop.example.org/order/12345/",
                "_links": {
                    "checkout": {
                        "href": "https://www.mollie.com/paymentscreen/issuer/select/ideal/7UhSN1zuXS",
                        "type": "text/html"
                    },
                    "self": {
                        "href": "https://api.mollie.com/v2/payments/tr_7UhSN1zuXS",
                        "type": "application/hal+json"
                    }
                }
            },
            { },
            { },
            { },
            { }
        ]
    },
    "_links": {
        "self": {
            "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/payments?limit=5",
            "type": "application/hal+json"
        },
        "previous": null,
        "next": {
            "href": "https://api.mollie.com/v2/customers/cst_8wmqcHMN4U/payments?from=tr_SDkzMggpvx&limit=5",
            "type": "application/hal+json"
        },
        "documentation": {
            "href": "https://docs.mollie.com/reference/v2/customers-api/list-customers",
            "type": "text/html"
        }
    }
}