Capture Transaction
Perform a full or partial capture on a transaction. You can perform multiple partial captures on a transaction but cannot capture more than the authorized amount.
Request
POST https://api.scanpay.dk/v2/{shopid}:trn:{trnid}/capture - trnid is the ID you received from calling seq.
Headers
| HTTP header | Description |
|---|---|
Idempotency-Key: xM3h1STdPREZVWXVNeTBqNzkwUTZUaHdCRWp4ZldGWHdKWjBX | Sending this header lets you fetch the result of the request at a later time even if the connection gets cut off. Simply send an identical request with the same key to retrieve the response. |
Fields
| JSON fields | Description |
|---|---|
"total": "199.95 DKK"
| The amount to capture. |
"index": 0
| Captures, refunds, and voids are all actions. To avoid duplicate actions as well as other race conditions, every action request requires an action index to be sent along with it. This index is simply the number of actions currently associated with the transaction as returned by the seq request. |
"history": [
{
"item": 0,
"quantity": 1,
"total": "199.95 DKK"
}
]
| Optional meta-data for the transaction. This data is purely for UX purposes and invalid data will simply be discarded. The scheme used by the dashboard is We strongly recommend that you follow this scheme when submitting your own data. |
Response
There are no defined response fields and as such this returns an empty JSON object.
Headers
| HTTP header | Description |
|---|---|
Idempotency-Status: OK | The response is a replay. |