# Get payment link Retrieve a single payment link by its ID. > 🔑 Access with > > [API key](/reference/authentication) > > [Organization access token with **payment-links.read**](/reference/authentication) > > [OAuth access with **payment-links.read**](/reference/authentication) # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Accepting payments", "version": "1.0.0", "license": { "name": "Attribution-NonCommercial-ShareAlike 4.0 International", "identifier": "CC-BY-NC-SA-4.0" } }, "servers": [ { "url": "https://api.mollie.com/v2" } ], "security": [ { "apiKey": [] }, { "organizationAccessToken": [] }, { "oAuth": [] } ], "paths": { "/payment-links/{paymentLinkId}": { "parameters": [ { "name": "paymentLinkId", "description": "Provide the ID of the related payment link.", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^pl_.+$", "example": "pl_d9fQur83kFdhH8hIhaZfq" } } ], "get": { "summary": "Get payment link", "x-speakeasy-name-override": "get", "tags": [ "Payment Links API" ], "operationId": "get-payment-link", "security": [ { "apiKey": [] }, { "organizationAccessToken": [ "payment-links.read" ] }, { "oAuth": [ "payment-links.read" ] } ], "description": "Retrieve a single payment link by its ID.\n\n> 🔑 Access with\n>\n> [API key](/reference/authentication)\n>\n> [Organization access token with **payment-links.read**](/reference/authentication)\n>\n> [OAuth access with **payment-links.read**](/reference/authentication)", "parameters": [ { "name": "testmode", "description": "Most API credentials are specifically created for either live mode or test mode. In those cases the `testmode` query parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the `testmode` query parameter to `true`.\n\nTest entities cannot be retrieved when the endpoint is set to live mode, and vice versa.", "in": "query", "schema": { "type": "boolean", "example": false } } ], "responses": { "200": { "description": "The payment link object.", "content": { "application/hal+json": { "schema": { "allOf": [ { "type": "object", "properties": { "resource": { "type": "string", "description": "Indicates the response contains a payment link object. Will always contain the string `payment-link` for this endpoint.", "readOnly": true, "default": "payment-link" }, "id": { "allOf": [ { "type": "string", "pattern": "^pl_.+$", "example": "pl_d9fQur83kFdhH8hIhaZfq" } ], "description": "The identifier uniquely referring to this payment link. Example: `pl_4Y0eZitmBnQ6IDoMqZQKh`.", "readOnly": true }, "mode": { "type": "string", "description": "Whether this entity was created in live mode or in test mode.\n\nPossible values: `live` `test`", "readOnly": true, "example": "live" }, "description": { "type": "string", "description": "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.", "maxLength": 255, "example": "Chess Board" }, "amount": { "description": "The amount of the payment link. If no amount is provided initially, the customer will be prompted to enter an amount.", "type": [ "object", "null" ], "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "minimumAmount": { "description": "The minimum amount of the payment link. This property is only allowed when there is no amount provided. The customer will be prompted to enter a value greater than or equal to the minimum amount.", "type": [ "object", "null" ], "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "archived": { "type": "boolean", "description": "Whether the payment link is archived. Customers will not be able to complete payments on archived payment links.", "example": false, "readOnly": true }, "redirectUrl": { "type": [ "string", "null" ], "description": "The URL your customer will be redirected to after completing the payment process. If no redirect URL is provided, the customer will be shown a generic message after completing the payment.", "example": "https://webshop.example.org/payment-links/redirect/" }, "webhookUrl": { "type": [ "string", "null" ], "description": "The webhook URL where we will send payment status updates to.\n\nThe webhookUrl is optional, but without a webhook you will miss out on important status changes to any payments resulting from the payment link.\n\nThe webhookUrl must be reachable from Mollie's point of view, so you cannot use `localhost`. If you want to use webhook during development on `localhost`, you must use a tool like ngrok to have the webhooks delivered to your local machine.", "example": "https://webshop.example.org/payment-links/webhook/" }, "lines": { "type": [ "array", "null" ], "description": "Optionally provide the order lines for the payment. Each line contains details such as a description of the item ordered and its price.\n\nAll lines must have the same currency as the payment.\n\nRequired for payment methods `billie`, `in3`, `klarna`, `riverty` and `voucher`.", "items": { "type": "object", "required": [ "description", "quantity", "unitPrice", "totalAmount" ], "properties": { "type": { "type": "string", "description": "The type of product purchased. For example, a physical or a digital product.\n\nThe `tip` payment line type is not available when creating a payment.\n\nPossible values: `physical` `digital` `shipping_fee` `discount` `store_credit` `gift_card` `surcharge` `tip` (default: `physical`)", "example": "physical" }, "description": { "type": "string", "description": "A description of the line item. For example *LEGO 4440 Forest Police Station*.", "example": "LEGO 4440 Forest Police Station" }, "quantity": { "type": "integer", "description": "The number of items.", "minimum": 1, "example": 1 }, "quantityUnit": { "type": "string", "description": "The unit for the quantity. For example *pcs*, *kg*, or *cm*.", "example": "pcs" }, "unitPrice": { "description": "The price of a single item including VAT.\n\nFor example: `{\"currency\":\"EUR\", \"value\":\"89.00\"}` if the box of LEGO costs €89.00 each.\n\nFor types `discount`, `store_credit`, and `gift_card`, the unit price must be negative.\n\nThe unit price can be zero in case of free items.", "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "discountAmount": { "description": "Any line-specific discounts, as a positive amount. Not relevant if the line itself is already a discount type.", "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "totalAmount": { "description": "The total amount of the line, including VAT and discounts.\n\nShould match the following formula: `(unitPrice × quantity) - discountAmount`.\n\nThe sum of all `totalAmount` values of all order lines should be equal to the full payment amount.", "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "vatRate": { "type": "string", "description": "The VAT rate applied to the line, for example `21.00` for 21%. The vatRate should be passed as a string and not as a float, to ensure the correct number of decimals are passed.", "example": "21.00" }, "vatAmount": { "description": "The amount of value-added tax on the line. The `totalAmount` field includes VAT, so the `vatAmount` can be calculated with the formula `totalAmount × (vatRate / (100 + vatRate))`.\n\nAny deviations from this will result in an error.\n\nFor example, for a `totalAmount` of SEK 100.00 with a 25.00% VAT rate, we expect a VAT amount of `SEK 100.00 × (25 / 125) = SEK 20.00`.", "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "sku": { "type": "string", "description": "The SKU, EAN, ISBN or UPC of the product sold.", "maxLength": 64, "example": "9780241661628" }, "categories": { "type": "array", "description": "An array with the voucher categories, in case of a line eligible for a voucher. See the [Integrating Vouchers](https://docs.mollie.com/docs/integrating-vouchers/) guide for more information.\n\nPossible values: `eco` `gift` `meal` `sport_culture` `additional` `consume`", "items": { "type": "string", "enum": [ "eco", "gift", "meal", "sport_culture", "additional", "consume" ], "example": "eco" }, "example": [ "meal", "eco" ] }, "imageUrl": { "type": "string", "description": "A link pointing to an image of the product sold.", "example": "https://..." }, "productUrl": { "type": "string", "description": "A link pointing to the product page in your web shop of the product sold.", "example": "https://..." } } } }, "billingAddress": { "description": "The customer's billing address details. We advise to provide these details to improve fraud protection and conversion.\n\nShould include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and `country`.\n\nRequired for payment method `in3`, `klarna`, `billie` and `riverty`.", "type": "object", "properties": { "title": { "type": "string", "description": "The title of the person, for example *Mr.* or *Mrs.*.", "example": "Mr." }, "givenName": { "type": "string", "description": "The given name (first name) of the person should be at least two characters and cannot contain only numbers.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Piet" }, "familyName": { "type": "string", "description": "The given family name (surname) of the person should be at least two characters and cannot contain only numbers.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Mondriaan" }, "organizationName": { "type": "string", "description": "The name of the organization, in case the addressee is an organization.", "example": "Mollie B.V." }, "streetAndNumber": { "type": "string", "description": "A street and street number.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Keizersgracht 126" }, "streetAdditional": { "type": "string", "description": "Any additional addressing details, for example an apartment number.", "example": "Apt. 1" }, "postalCode": { "type": "string", "description": "A postal code. This field may be required if the provided country has a postal code system.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "1234AB" }, "email": { "type": "string", "description": "A valid e-mail address.\n\nIf you provide the email address for a `banktransfer` payment, we will automatically send the instructions email upon payment creation. The language of the email will follow the locale parameter of the payment.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "piet@example.org" }, "phone": { "type": "string", "description": "If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070.", "example": 31208202070 }, "city": { "type": "string", "description": "A city name.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Amsterdam" }, "region": { "type": "string", "description": "The top-level administrative subdivision of the country. For example: Noord-Holland.", "example": "Noord-Holland" }, "country": { "type": "string", "description": "A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "NL" } } }, "shippingAddress": { "description": "The customer's shipping address details. We advise to provide these details to improve fraud protection and conversion.\n\nShould include `email` or a valid postal address consisting of `streetAndNumber`, `postalCode`, `city` and `country`.", "type": "object", "properties": { "title": { "type": "string", "description": "The title of the person, for example *Mr.* or *Mrs.*.", "example": "Mr." }, "givenName": { "type": "string", "description": "The given name (first name) of the person should be at least two characters and cannot contain only numbers.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Piet" }, "familyName": { "type": "string", "description": "The given family name (surname) of the person should be at least two characters and cannot contain only numbers.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Mondriaan" }, "organizationName": { "type": "string", "description": "The name of the organization, in case the addressee is an organization.", "example": "Mollie B.V." }, "streetAndNumber": { "type": "string", "description": "A street and street number.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Keizersgracht 126" }, "streetAdditional": { "type": "string", "description": "Any additional addressing details, for example an apartment number.", "example": "Apt. 1" }, "postalCode": { "type": "string", "description": "A postal code. This field may be required if the provided country has a postal code system.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "1234AB" }, "email": { "type": "string", "description": "A valid e-mail address.\n\nIf you provide the email address for a `banktransfer` payment, we will automatically send the instructions email upon payment creation. The language of the email will follow the locale parameter of the payment.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "piet@example.org" }, "phone": { "type": "string", "description": "If provided, it must be in the [E.164](https://en.wikipedia.org/wiki/E.164) format. For example: +31208202070.", "example": 31208202070 }, "city": { "type": "string", "description": "A city name.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "Amsterdam" }, "region": { "type": "string", "description": "The top-level administrative subdivision of the country. For example: Noord-Holland.", "example": "Noord-Holland" }, "country": { "type": "string", "description": "A country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.\n\nRequired for payment methods `billie`, `in3`, `klarna` and `riverty`.", "example": "NL" } } }, "profileId": { "type": [ "string", "null" ], "description": "The identifier referring to the [profile](get-profile) this entity belongs to.\n\nMost API credentials are linked to a single profile. In these cases the `profileId` must not be sent in the creation request. For organization-level credentials such as OAuth access tokens however, the `profileId` parameter is required.", "example": "pfl_QkEhN94Ba" }, "reusable": { "type": [ "boolean", "null" ], "description": "Indicates whether the payment link is reusable. If this field is set to `true`, customers can make multiple payments using the same link.\n\nIf no value is specified, the field defaults to `false`, allowing only a single payment per link.", "default": false }, "createdAt": { "type": "string", "description": "The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.", "readOnly": true, "example": "2024-03-20T09:13:37+00:00" }, "paidAt": { "type": [ "string", "null" ], "description": "The date and time the payment link became paid, in ISO 8601 format.", "example": "2025-12-24T11:00:16+00:00", "readOnly": true }, "expiresAt": { "type": [ "string", "null" ], "description": "The date and time the payment link is set to expire, in ISO 8601 format. If no expiry date was provided up front, the payment link will not expire automatically.", "example": "2025-12-24T11:00:16+00:00" }, "allowedMethods": { "type": [ "array", "null" ], "description": "An array of payment methods that are allowed to be used for this payment link. When this parameter is not provided or is an empty array, all enabled payment methods will be available.\n\nPossible values: `applepay` `bacs` `bancomatpay` `bancontact` `banktransfer` `belfius` `billie` `blik` `creditcard` `eps` `giftcard` `ideal` `in3` `kbc` `klarna` `mbway` `multibanco` `mybank` `paybybank` `paypal` `paysafecard` `pointofsale` `przelewy24` `riverty` `satispay` `swish` `trustly` `twint` `voucher`", "items": { "type": "string", "enum": [ "applepay", "bacs", "bancomatpay", "bancontact", "banktransfer", "belfius", "billie", "blik", "creditcard", "eps", "giftcard", "ideal", "in3", "kbc", "klarna", "mbway", "multibanco", "mybank", "paybybank", "paypal", "paysafecard", "pointofsale", "przelewy24", "riverty", "satispay", "swish", "trustly", "twint", "voucher" ], "example": "ideal" } }, "applicationFee": { "type": "object", "description": "With Mollie Connect you can charge fees on payment links that your app is processing on behalf of other Mollie merchants.\n\nIf you use OAuth to create payment links on a connected merchant's account, you can charge a fee using this `applicationFee` parameter. If a payment on the payment link succeeds, the fee will be deducted from the merchant's balance and sent to your own account balance.", "required": [ "amount", "description" ], "properties": { "amount": { "description": "The fee that you wish to charge.\n\nBe careful to leave enough space for Mollie's own fees to be deducted as well. For example, you cannot charge a €0.99 fee on a €1.00 payment.", "type": "object", "required": [ "currency", "value" ], "properties": { "currency": { "type": "string", "description": "A three-character ISO 4217 currency code.", "example": "EUR" }, "value": { "type": "string", "description": "A string containing an exact monetary amount in the given currency.", "example": "10.00" } } }, "description": { "type": "string", "description": "The description of the application fee. This will appear on settlement reports towards both you and the connected merchant.", "maxLength": 255, "example": "Platform fee" } } }, "sequenceType": { "description": "If set to `first`, a payment mandate is established right after a payment is made by the customer.\n\nDefaults to `oneoff`, which is a regular payment link and will not establish a mandate after payment.\n\nThe mandate ID can be retrieved by making a call to the [Payment Link Payments Endpoint](get-payment-link-payments).\n\nPossible values: `oneoff` `first`", "type": "string", "example": "oneoff" }, "customerId": { "type": [ "string", "null" ], "description": "**Only relevant when `sequenceType` is set to `first`**\n\nThe ID of the [customer](get-customer) the payment link is being created for. If a value is not provided, the customer will be required to input relevant information which will be used to establish a mandate after the payment is made.", "example": "cst_XimFHuaEzd" }, "testmode": { "type": [ "boolean", "null" ], "description": "Whether to create the entity in test mode or live mode.\n\nMost API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting `testmode` to `true`.", "writeOnly": true, "example": false }, "_links": { "type": "object", "description": "An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.", "required": [ "self", "paymentLink" ], "properties": { "self": { "type": "object", "description": "In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } }, "paymentLink": { "description": "The URL your customer should visit to make the payment. This is where you should redirect the customer to.", "type": "object", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "description": "The actual URL string.", "example": "https://..." }, "type": { "type": "string", "description": "The content type of the page or endpoint the URL points to.", "example": "application/hal+json" } } } }, "readOnly": true } } }, { "type": "object", "required": [ "resource", "id", "mode", "description", "archived", "reusable", "profileId", "amount", "webhookUrl", "redirectUrl", "createdAt", "paidAt", "expiresAt", "allowedMethods", "_links" ] } ] }, "examples": { "get-payment-link-200-1": { "summary": "The payment link object", "value": { "resource": "payment-link", "id": "pl_4Y0eZitmBnQ6IDoMqZQKh", "mode": "live", "description": "Bicycle tires", "amount": { "currency": "EUR", "value": "24.95" }, "archived": false, "redirectUrl": "https://webshop.example.org/thanks", "webhookUrl": "https://webshop.example.org/payment-links/webhook", "profileId": "pfl_QkEhN94Ba", "createdAt": "2021-03-20T09:29:56+00:00", "paidAt": "2022-03-20T09:29:56+00:00", "expiresAt": "2023-06-06T11:00:00+00:00", "reusable": false, "allowedMethods": [ "ideal" ], "sequenceType": "oneoff", "customerId": null, "_links": { "self": { "href": "...", "type": "application/hal+json" }, "paymentLink": { "href": "https://payment-links.mollie.com/payment/4Y0eZitmBnQ6IDoMqZQKh", "type": "text/html" }, "documentation": { "href": "...", "type": "text/html" } } } } } } } }, "404": { "description": "No entity with this ID exists.", "content": { "application/hal+json": { "schema": { "type": "object", "description": "An error response object.", "required": [ "status", "title", "detail", "_links" ], "properties": { "status": { "type": "integer", "description": "The status code of the error message. This is always the same code as the status code of the HTTP message itself.", "minimum": 400, "maximum": 599, "example": 404 }, "title": { "type": "string", "description": "The HTTP reason phrase of the error. For example, for a `404` error, the `title` will be `Not Found`.", "example": "Not Found" }, "detail": { "type": "string", "description": "A detailed human-readable description of the error that occurred.", "example": "The resource does not exist" }, "field": { "type": "string", "description": "If the error was caused by a value provided by you in a specific field, the `field` property will contain the name of the field that caused the issue.", "example": "description" }, "_links": { "type": "object", "required": [ "documentation" ], "properties": { "documentation": { "type": "object", "description": "The URL to the generic Mollie API error handling guide.", "required": [ "href", "type" ], "properties": { "href": { "type": "string", "example": "https://docs.mollie.com/errors" }, "type": { "type": "string", "example": "text/html" } } } } } } }, "example": { "status": 404, "title": "Not Found", "detail": "No entity exists with token 'uct_abcDEFghij123456789'", "_links": { "documentation": { "href": "...", "type": "text/html" } } } } } } }, "x-readme": { "code-samples": [ { "language": "shell", "code": "curl -X GET https://api.mollie.com/v2/payment-links/pl_4Y0eZitmBnQ6IDoMqZQKh \\\n -H \"Authorization: Bearer live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM\"" }, { "language": "php", "code": "setApiKey(\"live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM\");\n\n$paymentLink = $mollie->send(new GetPaymentLinkRequest(\"pl_4Y0eZitmBnQ6IDoMqZQKh\"));", "install": "composer require mollie/mollie-api-php" }, { "language": "node", "code": "const { createMollieClient } = require('@mollie/api-client');\nconst mollieClient = createMollieClient({ apiKey: 'live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });\n\nconst paymentLink = await mollieClient.paymentLinks.get('pl_4Y0eZitmBnQ6IDoMqZQKh');", "install": "npm install @mollie/api-client" }, { "language": "python", "code": "from mollie.api.client import Client\n\nmollie_client = Client()\nmollie_client.set_api_key(\"live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM\")\n\npayment_link = mollie_client.payment_links.get(\"pl_4Y0eZitmBnQ6IDoMqZQKh\")", "install": "pip install mollie-api-python" }, { "language": "ruby", "code": "# We don't have a Ruby code example for this\n# API call yet.\n#\n# If you have some time to spare, feel free to\n# share suggestions on our Discord:\n# https://discord.gg/VaTVkXB4aQ", "install": "gem install mollie-api-ruby" } ] } } } }, "components": { "securitySchemes": { "apiKey": { "type": "http", "scheme": "bearer", "x-default": "live_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "organizationAccessToken": { "type": "http", "scheme": "bearer", "x-default": "access_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM" }, "oAuth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://my.mollie.com/oauth2/authorize", "tokenUrl": "https://api.mollie.com/oauth2/tokens", "scopes": {} } } } } }, "x-readme": { "explorer-enabled": false, "samples-languages": [ "shell", "php", "node", "python", "ruby" ] } } ```