Capture API
Below is an example in pseudocode. This is the absolute minimum you can send to create a payment link.
POST https://api.scanpay.dk/v1/transactions/32916:9203/capture
Authorization: Basic base64_encode("apikey"){
"total": "199.95 DKK",
"index": 0
}
Request Headers
The request endpoint is: https://api.scanpay.dk/v1/transactions/$shopid:$trnid/capture, where $shopid is the shopid and $trnid is the transaction id. Requests are authenticated with HTTP basic authentication.
| HTTP/1.1 headers | Description |
|---|---|
Authorization: Basic MTE1MzpZSFpJVUdRdzZOa0NJWWEzbUc2Q1djZ1NobmwxM3h1STdPREZVWXVNeTBqNzkwUTZUaHdCRWp4ZldGWHdKWjBX | Basic authentication, where your credentials (shopid:secret) are in the API key, so you only have to base64 encode the API key. |
Request Fields
There is a maximum request size limit of 32 kB.
| JSON fields | Description |
|---|---|
"total": "199.95 DKK" | The sequence number for the last change in the changes array. |
"index": 0 | The sequence number for the last change in the changes array. |