Edit

Charge Subscriber

Charge money from a specific subscriber.

Request

POST
https://api.scanpay.dk/v2/{shopid}:sub:{subid}/charge
  • subid is the subscriber ID you received when synchronizing.

Headers

HTTP headers 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 another request with the same header to retrieve the response. To ensure the validity of the response, you must check for the Idempotency-Status header.

Fields

The only required field is "items". All other fields are optional.

JSON fields Description
"autocapture": false Automatically capture the authorization. Unlike regular transactions this defaults to true.
"orderid": "CHG-000712" Like a regular transaction, this is the order ID assigned to this specific purchase.
"billing": {
    "name": "Michael Jensen",
    "company": "",
    "vatin": "",
    "gln": "",
    "email": "",
    "phone": "",
    "address": [
        "Hansens Allé 52"
    ],
    "city": "Tøjmose",
    "zip": "5883",
    "state": "",
    "country": ""
}

"shipping": {
    "name": "Mette Jensen",
    "company": "",
    "email": "",
    "phone": "",
    "address": [
        "Hansens Allé 52"
    ],
    "city": "Tøjmose",
    "zip": "5883",
    "state": "",
    "country": ""
}
Overrides for the stored address of the subscriber. Each address is overridden in its totality if any of its fields is present in your request.
"items": [
    {
        "name": "Monthly fee",
        "quantity": 1,
        "total": "99.95 DKK",
        "sku": ""
    }
]
An array of one or more items exactly as in regular transactions. Each item requires a "total" but all other fields are optional. The total amount that will be authorized is the sum of all "total" elements added together.

Response

Headers

HTTP headers Description
Idempotency-Status: OK This response is idempotent.