Edit

Refund transaction

Perform a full or partial refund on a transaction. You can perform multiple partial refunds on a transaction but cannot refund more than the captured amount.

Request

POST
https://api.scanpay.dk/v2/{shopid}:trn:{trnid}/refund
  • trnid is the transaction ID you received when synchronizing.

Fields

JSON fields Description
"total": "100 DKK" The amount to refund.
"index": 1 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": "100 DKK"
    },
    {
        "item": 701,
        "quantity": 9999999,
        "total": "1089230101093.47 ZWD"
    }
]

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 "item" being used as a 0-based index into the "items" array, "quantity" being how many of this item was captured or refunded, and "total" being the total amount (ie. covering the entire quantity) that was captured or refunded.

We recommend that you follow this scheme when submitting your own data.

With the refund API request, you can perform full or partial refunds on a captured transaction. You can perform multiple refunds but cannot refund more than the captured amount.

Response

There are no defined response fields and as such this returns an empty JSON object.