Paylink API offers the following functions for managing orders:
| Endpoint | Action |
|---|---|
| GET api/v1/orders | List orders |
| POST api/v1/orders | Add order |
| GET api/v1/orders/{orderId} | Get order |
| POST api/v1/orders/{orderId}/deliver | Send payment request |
| PUT api/v1/orders/{orderId} | Edit order |
| DELETE api/v1/orders/{orderId} | Delete order |
Please note that it’s not possible to create recurring orders through the API at the moment. If you would like to get notified when the feature is available, please send us an email to asiakaspalvelu@paylink.fi.
List orders
List all orders in descending order by date of creation.
Parameters
pending to retrieve unpaid orders or completed for paid orders.2025-01-01T00:00:00Z)curl -i -X GET -H "Authorization:Token API-KEY" 'https://test.app.paylink.fi/api/v1/orders?page=1'
{
"has_more":false,
"data":[
{
"id":5735,
"display_id":"1030",
"order_number_prefix":"PL",
"due_date":"2020-08-25",
"customer_locale":"fi_FI",
"status":"pending",
"notes":"Order notes",
"info_before": "Info before line items",
"info_after": "Info after line items",
"customer_id":null,
"email":"matti.meikalainen@example.com",
"payment_url": "https://test.app.paylink.fi/pay/0ba5e6c045ac4e0cfd",
"created_at":"2020-08-14T15:06:14.000+03:00",
"updated_at":"2020-08-14T15:06:14.000+03:00",
"paid_at": null,
"reference": "",
"transaction": null,
"address":{
"firstname":"Matti",
"lastname":"Meikäläinen",
"company":null,
"company_id":null,
"address":"Testikatu 1",
"city":"Helsinki",
"postcode":"00100",
"phone":"0401234567",
"country":"FI"
},
"items":[
{
"title":"Test product",
"unit_base_price_cents":81,
"unit_tax_cents":19,
"unit_total_price_cents":100,
"tax_rate_id":"fi_standard",
"total_base_price_cents":81,
"total_tax_cents":19,
"total_price_cents":100,
"quantity":1,
"product_id":null
}
],
"custom_fields": []
}
...
]
}
Add order
Add new order
Parameters
fi_FI or en_US. Default fi_FIYYYY-MM-DD (e.g. 2024-04-15).display_id). For example, if prefix is "P-" and order number 123, the final order number will be "P-123". Prefix can contain letters, numbers and dashes. Default prefix can be set in the settings (Settings > Orders > Order number prefix).-) can be used as placeholder.FI)fi_standard (25,5 %), fi_intermediate (14 %, 13,5 % from 1.1.2026), fi_reduced (10 %) or fi_zero (0 %)tax_rate_id will determine the valuecurl -i -X POST \
-H "Authorization:Token API-KEY" \
-H "Content-Type:application/json" \
-d \
'{
"email": "matti.meikalainen@example.com",
"customer_locale": "fi_FI",
"notes": "Order notes",
"info_before": "Info before line items",
"info_after": "Info after line items",
"due_date": "2020-08-25",
"reference": "10003",
"display_id": 1000,
"order_number_prefix": "PL",
"customer_id": null,
"address": {
"firstname": "Matti",
"lastname": "Meikäläinen",
"address": "Testikatu 1",
"postcode": "00100",
"city": "Helsinki",
"phone": "0401234567",
"country": "FI"
},
"items": [
{
"title": "Test product",
"unit_total_price_cents": 100,
"quantity":1,
"tax_rate_id":"fi_standard",
"tax_rate_pct":25.5,
"product_id": null
}
]
}' \
'https://test.app.paylink.fi/api/v1/orders'
{
"id": 5737,
"display_id": "1000",
"order_number_prefix": "PL",
"due_date": "2020-08-25",
"customer_locale": "fi_FI",
"status": "pending",
"notes": "Order notes",
"info_before": "Info before line items",
"info_after": "Info after line items",
"customer_id": null,
"email": "matti.meikalainen@example.com",
"payment_url": "https://test.app.paylink.fi/pay/0ba5e6c045ac4e0cfd",
"created_at": "2020-08-17T12:06:41.000+03:00",
"updated_at": "2020-08-17T12:06:41.000+03:00",
"paid_at": null,
"reference": "10003",
"transaction": null,
"address": {
"firstname": "Matti",
"lastname": "Meikäläinen",
"company": null,
"company_id": null,
"address": "Testikatu 1",
"city": "Helsinki",
"postcode": "00100",
"phone": "0401234567",
"country": "FI"
},
"items": [
{
"title": "Test product",
"unit_base_price_cents": 80,
"unit_tax_cents": 20,
"unit_total_price_cents": 100,
"tax_rate_id": "fi_standard",
"tax_rate_pct": 25.5,
"total_base_price_cents": 80,
"total_tax_cents": 20,
"total_price_cents": 100,
"quantity": 1,
"product_id": null
}
],
"custom_fields": []
}
Get order
Get order details.
Parameters
curl -i -X GET \
-H "Authorization:Token API-KEY" \
'https://test.app.paylink.fi/api/v1/orders/1'
{
"id": 1,
"display_id": "1000",
"order_number_prefix": "PL",
"due_date": "2020-08-25",
"customer_locale": "fi_FI",
"status": "pending",
"notes": "Order notes",
"info_before": "Info before line items",
"info_after": "Info after line items",
"customer_id": null,
"email": "matti.meikalainen@example.com",
"payment_url": "https://test.app.paylink.fi/pay/0ba5e6c045ac4e0cfd",
"created_at": "2020-08-17T12:06:41.000+03:00",
"updated_at": "2020-08-17T12:06:41.000+03:00",
"paid_at": null,
"reference": "",
"transaction": null,
"address": {
"firstname": "Matti",
"lastname": "Meikäläinen",
"company": null,
"company_id": null,
"address": "Testikatu 1",
"city": "Helsinki",
"postcode": "00100",
"phone": "0401234567",
"country": "FI"
},
"items": [
{
"title": "Test product",
"unit_base_price_cents": 81,
"unit_tax_cents": 19,
"unit_total_price_cents": 100,
"tax_rate_id": "fi_standard",
"total_base_price_cents": 81,
"total_tax_cents": 19,
"total_price_cents": 100,
"quantity": 1,
"product_id": null
}
],
"custom_fields": []
}
Send payment request
Send payment request to the customer via email.
Parameters
curl -i -X POST \
-H "Authorization:Token API-KEY" \
-H "Content-Type:application/json" \
-d \
'' \
'https://test.app.paylink.fi/api/v1/orders/1/deliver'
{
"id": 1,
"display_id": "1000",
"order_number_prefix": "PL",
"due_date": "2020-08-25",
"customer_locale": "fi_FI",
"status": "pending",
"notes": "Order notes",
"info_before": "Info before line items",
"info_after": "Info after line items",
"customer_id": null,
"email": "matti.meikalainen@example.com",
"payment_url": "https://test.app.paylink.fi/pay/0ba5e6c045ac4e0cfd",
"created_at": "2020-08-17T12:06:41.000+03:00",
"updated_at": "2020-08-17T12:06:41.000+03:00",
"paid_at": null,
"reference": "10003",
"transaction": null,
"address": {
"firstname": "Matti",
"lastname": "Meikäläinen",
"company": null,
"company_id": null,
"address": "Testikatu 1",
"city": "Helsinki",
"postcode": "00100",
"phone": "0401234567",
"country": "FI"
},
"items": [
{
"title": "Test product",
"unit_base_price_cents": 81,
"unit_tax_cents": 19,
"unit_total_price_cents": 100,
"tax_rate_id": "fi_standard",
"total_base_price_cents": 81,
"total_tax_cents": 19,
"total_price_cents": 100,
"quantity": 1,
"product_id": null
}
],
"custom_fields": []
}
Edit order
Edit order details.
Note! Only notes can be edited for paid orders.
Parameters
curl -i -X PUT \
-H "Authorization:Token API-KEY" \
-H "Content-Type:application/json" \
-d \
'{
"notes": "New notes"
}' \
'https://test.app.paylink.fi/api/v1/orders/1'
{
"id": 1,
"display_id": "1000",
"order_number_prefix": "PL",
"due_date": "2020-08-25",
"customer_locale": "fi_FI",
"status": "pending",
"notes": "New notes",
"info_before": "Info before line items",
"info_after": "Info after line items",
"customer_id": null,
"email": "matti.meikalainen@example.com",
"payment_url": "https://test.app.paylink.fi/pay/0ba5e6c045ac4e0cfd",
"created_at": "2020-08-17T12:06:41.000+03:00",
"updated_at": "2020-08-17T12:06:41.000+03:00",
"paid_at": null,
"reference": "10003",
"transaction": null,
"address": {
"firstname": "Matti",
"lastname": "Meikäläinen",
"company": null,
"company_id": null,
"address": "Testikatu 1",
"city": "Helsinki",
"postcode": "00100",
"phone": "0401234567",
"country": "FI"
},
"items": [
{
"title": "Test product",
"unit_base_price_cents": 81,
"unit_tax_cents": 19,
"unit_total_price_cents": 100,
"tax_rate_id": "fi_standard",
"total_base_price_cents": 81,
"total_tax_cents": 19,
"total_price_cents": 100,
"quantity": 1,
"product_id": null
}
],
"custom_fields": []
}
Delete order
Delete order.
Note! Paid orders cannot be deleted.
Parameters
curl -i -X DELETE \
-H "Authorization:Token API-KEY" \
'https://test.app.paylink.fi/api/v1/orders/1'
Order PDFs
API allows you to retrieve order PDFs by including the inline_pdf=1 query parameter in your request. The PDF will be returned as a base64-encoded binary file within the response.
This feature is supported on all order endpoints except:
- GET
/api/v1/orders - DELETE
/api/v1/orders/{orderId}
The generated PDF will be:
- An invoice for pending orders
- A receipt for completed orders
Parameters
1 to include the order PDF (base64-encoded) in the response, or 0 to exclude it.curl -i -X GET \
-H "Authorization:Token API-KEY" \
'https://test.app.paylink.fi/api/v1/orders/1?inline_pdf=1'
{
"id": 100000,
"display_id": "100000",
"order_number_prefix": "",
"due_date": "2025-01-01",
...
"pdf": "JVBERi0xLjMKJf..."
}