Get all payments

Returns all payments that have been made against your QR codes (SnapCodes). If no parameters are provided all payments made to you will be returned, subject to pagination. By default if the status parameter isn't provided completed, errored and pending payments will be returned.

A successful response is always an array and is paginated. If no payments match your query parameters the array will be empty. Payments are ordered by descending IDs, ie. the first payment will always be the latest in the returned result.


HTTP request

GET https://pos.snapscan.io/merchant/api/v1/payments
curl -u your-api-key: "https://pos.snapscan.io/merchant/api/v1/payments"

The above command returns JSON structured like this:

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "id": 2,
    "status": "error",
    "date": "2000-01-01T01:00:00Z",
    "totalAmount": 2050,
    "tipAmount": 550,
    "requiredAmount": 1500,
    "snapCode": "STB115",
    "snapCodeReference": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "userReference": "Jane Doe",
    "merchantReference": "INV002",
    "statementReference": "SNAPSCAN 20150109",
    "authCode": "654321",
    "extra": null,
    "deviceSerialNumber": "R28K10HBQTX",
    "transactionType": "payment",
  },
  {
    "id": 1,
    "status": "completed",
    "date": "1999-12-31T23:00:00Z",
    "totalAmount": 1000,
    "tipAmount": 0,
    "requiredAmount": 1000,
    "snapCode": "STB115",
    "snapCodeReference": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "userReference": "John Doe",
    "merchantReference": "INV001",
    "statementReference": "SNAPSCAN 20150109",
    "authCode": "123456",
    "extra": null,
    "deviceSerialNumber": "R28K10HBQTX",
    "transactionType": "payment",
  }
]

Query parameters

All parameters are optional.

ParameterDescription
startDatePayments that were started at or after this time, eg: 2000-01-01T01:00:00Z
endDatePayments that were started before this time, eg: 2000-01-01T01:00:00Z
statusA comma separated string of the following values: completed, error or pending, eg. completed,pending
snapCodePayments with the SnapCode.
snapCodeReferencePayments with the SnapCode reference.
userReferencePayments with the user reference.
merchantReferencePayments with your reference.
statementReferencePayments included in the settlement with the provided reference.

Response codes

DescriptionDescriptionJSON Response
OK200Array of payment objects
Invalid parameter400Object containing a message key