Get payment link¶
Payment links API v2
GET
https://api.mollie.com/v2/payment-links/*id*
Authentication:API keysOrganization access tokensApp access tokens
Retrieve a single payment link object by its token.
Parameters¶
Replace id
in the endpoint URL by the payment link’s ID, for example pl_4Y0eZitmBnQ6IDoMqZQKh
.
Response¶
200
application/hal+json
resource
string
Indicates the response contains a payment link object. Will always contain
payment-link
for this endpoint.id
string
The identifier uniquely referring to this payment link. Mollie assigns this identifier at creation time. For example
pl_4Y0eZitmBnQ6IDoMqZQKh
. Its ID will always be used by Mollie to refer to a certain payment link.description
string
A short description of the payment link. The description is visible in the Dashboard and will be shown on the
customer’s bank or card statement when possible. This description will eventual been used as payment description.
mode
stringThe mode used to create this payment link. Mode determines whether a payment link is real (live mode) or a test payment link.
Possible values: live
test
profileId
string
The identifier referring to the profile this payment link was created on. For example,
pfl_QkEhN94Ba
.amount
amount objectThe amount of the payment link, e.g. {"currency":"EUR", "value":"100.00"}
for a €100.00 payment link.
currency
string
The ISO 4217 currency code.
value
string
A string containing the exact amount of the payment link in the given currency.
archived
boolean
Whether the payment link is archived. Customers will not be able to complete payments on archived payment links.
redirectUrl
string
The URL your customer will be redirected to after completing the payment process.
webhookUrl
stringoptional
The URL Mollie will call as soon an important status change takes place.
createdAt
datetime
The payment link’s date and time of creation, in ISO 8601 format.
paidAt
datetimeoptional
The date and time the payment link became paid, in ISO 8601 format.
updatedAt
datetimeoptional
The date and time the payment link last status change, in ISO 8601
format.
expiresAt
datetimeoptional
The expiry date and time of the payment link, in ISO 8601 format.
_links
objectAn object with several URL objects relevant to the payment link. Every URL object will contain an href
and a
type
field.
self
URL object
The API resource URL of the payment link itself.
paymentLink
URL object
Direct link to the payment link.
documentation
URL object
The URL to the payment link retrieval endpoint documentation.
Example¶
cURLPHPPythonRubyNode.js
1 2 | curl -X GET https://api.mollie.com/v2/payment-links/pl_4Y0eZitmBnQ6IDoMqZQKh \ -H "Authorization: Bearer test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" |
1 2 3 4 | <?php $mollie = new \Mollie\Api\MollieApiClient(); $mollie->setApiKey("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM"); $paymentLink = $mollie->paymentLinks->get("pl_4Y0eZitmBnQ6IDoMqZQKh"); |
1 2 3 4 5 6 | from mollie.api.client import Client mollie_client = Client() mollie_client.set_api_key("test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM") payment_link = mollie_client.payment_links.get("pl_4Y0eZitmBnQ6IDoMqZQKh") |
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 | HTTP/1.1 200 OK Content-Type: application/hal+json { "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" } } } |