Create payment link
Request
POST
https://api.scanpay.dk/v2/{shopid}:pay/new
Headers
| HTTP header | Description |
|---|---|
X-Cardholder-IP: 127.105.175.99
|
The IPv4 or IPv6 address of the customer making the payment. It's optional but highly recommended. |
Fields
The only required field is "items". All other fields are optional.
| JSON field | 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. If set to true then partial authorizations are rejected and should the capture attempt fail then the authorization will be automatically voided and not saved in the transaction database.
|
"lifetime": "7d"
|
Payment link lifetime in days ("d"), hours ("h"), minutes ("m"), and seconds ("s"). The default is "1h" and max is "30d". Increasing the lifetime will also increase the length of the returned URL.
|
Response
| JSON fields | Description |
|---|---|
"url": "https://betal.scanpay.dk/9qdvbx2r"
|
The payment link. You can redirect the customer to this URL to complete the payment. |
"id": "9qdvbx2r"
|
The payment ID. |
Link Parameters
The following link parameters can be appended to the payment link:
| Link parameter | Description |
|---|---|
?go=mobilepay
|
Redirect the customer to MobilePay Online. |
?go=applepay
|
Present the Apple Pay button. |