List payment links¶
Payment links API v2
GET
https://api.mollie.com/v2/payment-links
Authentication:API keysOrganization access tokensApp access tokens
Retrieve all payments links created with the current website profile, ordered from newest to oldest.
The results are paginated. See pagination for more information.
Parameters¶
from
stringoptional
Used for pagination. Offset the result set to the payment link with this ID. The payment
link with this ID is included in the result set as well.
limit
integeroptional
The number of payment links to return (with a maximum of 250).
Access token parameters¶
If you are using organization access tokens or are creating an OAuth app, the following query string parameters are also available.
The website profile’s unique identifier, for example
pfl_3RkSN1zuPE
. Omit this parameter to retrieve the payment
links of all profiles of the current organization.
Set this to
true
to only retrieve payment links made in test mode. By default, only live payment links are
returned.Response¶
200
application/hal+json
count
integer
The number of payment links found in
_embedded
, which is either the requested number (with a maximum of 250) or
the default number._embedded
objectThe object containing the queried data.
payment_links
array
An array of payment link objects as described in
Get payment link.
_links
objectLinks to help navigate through the lists of payment links. Every URL object will contain an href
and a type
field.
self
URL object
The URL to the current set of payment links.
previous
URL object
The previous set of payment links, if available.
next
URL object
The next set of payment links, if available.
documentation
URL object
The URL to the payment links list endpoint documentation.
Example¶
cURLPHPPythonRubyNode.js
1 2 | curl -X GET https://api.mollie.com/v2/payment-links?limit=5 \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
1 2 3 4 | <?php $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); $paymentLinks = $mollie->paymentLinks->page(null, 5); |
1 2 3 4 5 6 | from mollie.api.client import Client mollie_client = Client() mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM") payment_links = mollie_client.payment_links.list() |
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 share suggestions on our Discord: https://discord.gg/VaTVkXB4aQ |
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 share suggestions on our Discord: https://discord.gg/VaTVkXB4aQ |
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 | HTTP/1.1 200 OK Content-Type: application/hal+json { "count": 5, "_embedded": { "payment_links": [ { "resource": "payment-link", "id": "pl_4Y0eZitmBnQ6IDoMqZQKh", "mode": "test", "profileId": "pfl_QkEhN94Ba", "createdAt": "2021-03-20T09:13:37+00:00", "paidAt": "2021-03-21T09:13:37+00:00", "updatedAt": "2021-03-21T09:13:37+00:00", "expiresAt": null, "amount": { "value": "24.95", "currency": "EUR" }, "archived": false, "description": "Bicycle tires", "redirectUrl": "https://webshop.example.org/thanks", "webhookUrl": "https://webshop.example.org/payment-links/webhook/", "_links": { "self": { "href": "https://api.mollie.com/v2/payment-links/pl_4Y0eZitmBnQ6IDoMqZQKh", "type": "application/json" }, "paymentLink": { "href": "https://paymentlink.mollie.com/payment/4Y0eZitmBnQ6IDoMqZQKh/", "type": "text/html" }, "documentation": { "href": "https://docs.mollie.com/reference/v2/payment-links-api/get-payment-link", "type": "text/html" } } }, { }, { }, { }, { } ] }, "_links": { "self": { "href": "https://api.mollie.com/v2/payment-links?limit=5", "type": "application/hal+json" }, "previous": null, "next": { "href": "https://api.mollie.com/v2/payment-links?from=pl_ER6aqfpXg6nZrJvcsxNsm&limit=5", "type": "application/hal+json" }, "documentation": { "href": "https://docs.mollie.com/reference/v2/payment-links-api/list-payment-links", "type": "text/html" } } } |