Payment Link
With the Payment Link API, you can generate links to our hosted payment window, where customers can enter their payment details. Payment links are stateful and exist until expiration, defined by the lifetime field.
Here is a minimal example in pseudocode. You can find more examples in our client libraries.
POST https://api.scanpay.dk/v1/new
Authorization: Basic base64_encode("apikey"){
"items": [
{
"name": "Pink Floyd: The Dark Side Of The Moon",
"total": "199.90 DKK"
}
]
}
Successful responses have a 200 status code and a JSON body containing the payment link:
{
"url": "https://betal.scanpay.dk/9qdvbx2r"
}
Invalid responses will return a 4XX or 5XX error code and an error message. See error handling for more details.

Create payment link
The request endpoint is: https://api.scanpay.dk/v1/new.
| HTTP header | Description |
|---|---|
Authorization: Basic base64_ | HTTP basic authentication with your API key as credentials, which you will need to base64 encode. |
X-Cardholder-IP: 47.105.175.99 | Customer IPv4 or IPv6 address. It is used for DoS protection, and it is optional but recommended. |
Request Fields
The API is fault-tolerant and forgiving. Apart from items, all fields are optional, and we will ignore them if they are invalid. There is a maximum request size of 32 kB but no field size restrictions.
| JSON fields | Description |
|---|---|
| An array with one or more items. Each item needs a
|
| Customer billing and shipping address. We use it to protect your business against fraud, and we show the details in our dashboard.
|
"orderid": "1234zx" | An order identifier that identifies the order in your system. We send the ID to your acquirer and display it in the payment window. |
"successurl": "http://blixen.dk/success" | The success URL is where we send the customer after successful payment. |
"language": "da" | The desired payment window language in ISO 639-1. Default is the browser language. |
"autocapture": true | Automatically capture the payment. Default is false, which means that payments are authorized (reserved), but not captured. |
"lifetime": "7d" | Payment link lifetime in days ("d"), hours ("h") or minutes ("m"). Default is "1h" and max is "30d". Increasing the lifetime will also increase the length of the returned URL. |
Link Parameters
The following link parameters can be appended to the payment link:
| Link parameter | Description | ?go=mobilepay | Redirect the customer to MobilePay Online. You need to enable MobilePay Online here. |
|---|
Languages
When you create a payment link, you can select the desired language for the payment window. Our fallback is to choose the best available language, depending on the customers browser settings, i.e. the Accept-Language header. We currently support the following languages:
Payment Window
The payment window is a secure, hosted payment page that lets you collect payments quickly without worrying about PCI compliance. The payment window is accessible through payment links.
User interaction
The payment window is optimized for computers and phones. We support autofill in accordance with the whatwg autofill standard.

| Chrome | Safari | Safari on iOS | Firefox | Android browser | Edge | Opera |
|---|---|---|---|---|---|---|
| 51 2016-05 | 10.1 2016-05 | 10.1 2016-05 | 10.1 2016-05 | 44 2016-05 | 14 2016-05 | 38 2016-05 |