Get all cash up payments

Returns all payments that were completed successfully in the specified cash up period. If a cash up period contains any pending payments we will return a HTTP 500. A cash up period is considered complete once we know the status of all the payments within the period. When we return a HTTP 500 due to pending payments you should wait a couple of seconds and then retry the request. See Cash Ups for further details.


HTTP request

GET https://pos.snapscan.io/merchant/api/v1/payments/cash_ups/{reference}
curl -u your-api-key: "https://pos.snapscan.io/merchant/api/v1/payments/cash_ups/1e07ac748d2627ba"

The above command returns JSON structured like this:

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

[
  {
    "id": 3,
    "status": "completed",
    "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",
  }
]

If the period contains any pending payments you can expect the following response:

HTTP/1.1 500 INTERNAL SERVER ERROR
Content-Type: application/json

{
  "message": "The query is not ready yet because the specified cash up period contains pending payments, please try again in a moment."
}

Route parameters

The reference route parameter is required.

ParameterDescription
referenceThe cash up period's reference.

Response codes

DescriptionDescriptionJSON Response
OK200Array of payment objects
Reference doesn't exist404Object containing a message key
Pending payments500Object containing a message key