Paylink API allows you to integrate Paylink with other systems. For example, it can be used for:
- Create and send payment links
- Export order information
- Import customer and product information
Environments
Paylink API has environments for testing and production:
- Production: https://app.paylink.fi/api/v1
- Testing: https://test.app.paylink.fi/api/v1
Only HTTPS is supported.
Testing
Development and testing should be conducted in the test environment (test.app.paylink.fi). Get your test credentials ยป
API credentials
Each user has an API key which is used to authorize API requests. The API key is found in Settings > API where it can also be regenerated.
Authorization
HTTP header token is used to authenticate with API. All requests have to include Authorization header with Token <API-KEY> as the value.
Header | Value |
Authorization | Token <API-KEY> |
cURL example:
curl -i -X GET -H "Authorization:Token ce6988f6-6fb24b1f843ca1717a0f93f72b1cc78c" 'https://test.app.paylink.fi/api/v1/orders.json'
Error handling
API will return HTTP response code which indicates status of the request.
2xx | Success |
4xx | Error |
5xx | System error (e.g. invalid request JSON) |
API will also return error message in the response body for most errors. For example, the following error message will be returned for missing email when creating a new order:
{
"errors": [
"Email is required"
]
}