List payments¶
GET
https://api.mollie.com/v2/payments
Retrieve all payments created with the current website profile, ordered from newest to oldest.
The results are paginated. See pagination for more information.
Parameters¶
from
stringoptionallimit
integeroptionalAccess token parameters¶
If you are using organization access tokens or are creating an
OAuth app, you can specify which profile you are retrieving payments for using the
profileId
parameter. Organizations can have multiple profiles for each of their websites. If you omit the
profileId
parameter, the API will return all payments across all profiles. See
Profiles API for more information.
For these authentication methods the optional testmode
parameter is available as well to enable test mode.
pfl_3RkSN1zuPE
. Omit this parameter to retrieve all payments
across all profiles.Response¶
200
application/hal+json
count
integer_embedded
, which is either the requested number (with a maximum of 250) or the
default number._embedded
objectThe object containing the queried data.
payments
array_links
objectLinks to help navigate through the lists of payments. Every URL object will contain an href
and a type
field.
self
URL objectprevious
URL objectnext
URL objectdocumentation
URL objectExample¶
1 2 | curl -X GET https://api.mollie.com/v2/payments?limit=5 \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
1 2 3 4 5 6 7 8 9 | <?php $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); // get the first page $payments = $mollie->payments->page(); // get the next page $next_payments = $payments->next(); |
1 2 3 4 5 6 7 8 9 10 | from mollie.api.client import Client mollie_client = Client() mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM") # Get the first page payments = mollie_client.payments.list() # Get the next page next_payments = payments.get_next() |
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 payments = Mollie::Payment.all # get the next page next_payments = payments.next |
1 2 3 4 | const { createMollieClient } = require('@mollie/api-client'); const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' }); const payments = mollieClient.payments.iterate(); |
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 60 61 62 | 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": "Order #12345", "method": "ideal", "metadata": null, "details": null, "profileId": "pfl_QkEhN94Ba", "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" }, "dashboard": { "href": "https://www.mollie.com/dashboard/org_12345678/payments/tr_7UhSN1zuXS", "type": "text/html" }, } }, { }, { }, { }, { } ] }, "_links": { "self": { "href": "https://api.mollie.com/v2/payments?limit=5", "type": "application/hal+json" }, "previous": null, "next": { "href": "https://api.mollie.com/v2/payments?from=tr_SDkzMggpvx&limit=5", "type": "application/hal+json" }, "documentation": { "href": "https://docs.mollie.com/reference/v2/payments-api/list-payments", "type": "text/html" } } } |