1. Initiate a transaction
To initiate a paylink transaction, you need to use the Order:Create API.
Be sure to check out the API recipe for a simple, step-by-step code example that walks you through the process and helps you get started with this API quickly.
2.1 API reference
The Order.Create API reference, including the option to execute real-time requests, can be found at:: https://developer.pay.nl/reference/api_create_order-1
2.2 Authentication
Authentication occurs via Basic Authentication using:
- Token code (AT-…) as the username and API token (hash of 40 characters) as the password or
- Service ID (SL-…) as the username and the secret as the password.
You can find the Token code and the API token under the "Merchant" -> "Company information" tab in the PAY. Admin Panel.
You can find the Service ID and the secret under the tab "Settings" -> "Sales locations" in the PAY. Admin Panel. The Service ID is the unique reference of the sales location and starts with SL-… You can find the corresponding secret by clicking on the data icon of the relevant sales location. The secret, a 40- character hash, is displayed at the top of the popup.
2.3 Request
A request via the Order:Create API looks something like this:
curl --request POST \
--url https://connect.pay.nl/v1/orders \
--header 'accept: application/json' \
--header 'authorization: Basic dG9rZW46ZWQ2Nzg3OTQyOWM0ODkwYT*******A==' \
--header 'content-type: application/json' \
--data '
{
"amount": {
"value": 150,
"currency": "EUR"
},
"paymentMethod": {
"id": 961
},
"serviceId": "SL-1234-5678",
"description": "Paylink order",
"reference": "REF1234",
"expire": "2025-02-20T20:30:00",
"exchangeUrl": "https://demo.pay.nl/start/exchange.php"
}
In this example, a 1,50 EUR paylink is initiated via sales location SL-1234-5678. You should use 961 as the paymentMethod.id
.
The paylink will, by default, display all activated payment methods from sales location SL-1234-5678, provided that the conditions for each payment method are met (for example, required data, minimum and maximum amount).
Using the expire
variable (must be in ATOM/ISO-8601 format), you can specify the date until which the paylink remains valid. After this date, a message will appear indicating that the paylink has expired. If no expire value is provided, a default validity period of one week will be applied.
2.4 Response
A response via the Order:Create API looks something like this:
{
"id": "68e678e2-4744-8f8d-1d4d-2265038344e6",
"type": "paylink",
"serviceId": "SL-1234-5678",
"description": "Paylink order",
"reference": "REF1234",
"orderId": "47601470092X44e6",
"customerKey": null,
"status": {
"code": 20,
"action": "PENDING"
},
"receipt": null,
"integration": {
"pointOfInteraction": null,
"test": false
},
"amount": {
"value": 150,
"currency": "EUR"
},
"payments": [],
"createdAt": "2025-10-08T16:44:50+02:00",
"createdBy": "AT-0102-4965",
"modifiedAt": "2025-10-08T16:44:50+02:00",
"expiresAt": "2025-10-20T20:30:00+02:00",
"completedAt": null,
"links": {
"status": "https://connect.pay.nl/v1/orders/68e678e2-4744-8f8d-1d4d-2265038344e6/status",
"checkout": "https://checkout.pay.nl/to/order/68e678e2-4744-8f8d-1d4d-2265038344e6",
"redirect": "https://checkout.pay.nl/to/order/68e678e2-4744-8f8d-1d4d-2265038344e6"
}
}
The response from the Order.Create API contains a large number of variables. The most important ones are listed below:
Variable | Description |
---|---|
id | The unique reference of the entire order |
description | The text that is displayed on the payment screen and on the customer’s bank statement. Maximum of 32 characters |
reference | A unique reference to the merchant's internal order ID. |
status | The status of the paylink |
amount.value | The amount for which the paylink was initiated. |
payments | Contains an object for each payment attempt. Each object includes details such as the selected payment method, the amount, and the payment status. If the paylink has just been created and no payment attempt has been made yet, this variable will be empty. |
expiresAt | The validity period of the paylink. After this date the paylink will expire. |
links.status | Endpoint to verify the status of a paylink transaction. |
links.redirect | URL where the customer should be redirected to complete the payment |
2.5 Created paylink
The generated paylink can be found via the links.redirect
variable. You can, of course, email this paylink to the customer, but you can also convert it into a QR code to display it, for example, on an invoice. There are various online libraries available that can help you generate such a QR code.
2.6 Recipe
This recipe provides a quick, step-by-step guide to help you easily create a paylink using the Order.Create API.
Updated 2 days ago