Skip to content

Transactions

Glossary  

Endpoint Description
GET /transactions Fetch one or many transaction records using filters.
POST /transactions Post new or update existing transaction records for a client.

GET /transactions

Get a paginated set of transactions. You can filter results by date and status. You can narrow results to a specific customer by providing a cid parameter. Or you can query a single transaction by providing a tid (transaction id) parameter.

Use nextUrl to consume paginated results.

Example Request
/transactions?limit=50&date_after=2023-12-31
Parameter Required? Description
cid Optional Customer ID.
STRING
tid Optional Transaction ID.
STRING
limit Optional Limit the number of results per request.
INT (default: 50)
date_before Optional Return all records prior to and including this date.
STRING (format: YYYY-MM-DD)
date_after Optional Return all records after and including this date.
STRING (format: YYYY-MM-DD)
status Optional Comma delimited list of status' to include.
Accepts: complete,pending,declined,refund
STRING
Response OK 200
{
    "query": {
        "limit": 50,
        "results": 50,
        "totalRecords": 3200
    },
    "page": {
        "total": 64,
        "current": 1,
        "next": 2,
        "prev": 1
    },
    "cursor": {
        "prevUrl": null,
        "nextUrl": "/transactions?limit=50&page=2"
    },
    data: [
        {tid: "HIWRLD", ...}
    ]
}

POST /transactions

Submit new transactions. The request body is an array of transaction objects, so it supports one or many. When processing transactions in bulk, we recommend that each request contain no more than 100 transactions.

All amounts must be transmit as cents.

Example Request
{
    "options": {
        // true to let the api convert all dates to UTC
        "convert_utc": false,
        // receive webhook when batch complete
        "callback": "https://domain.com/webhook"
    },
    "transactions": [
        // new transaction
        {
            "cid": "123ABC",
            "total": 106298,               // $1,062.98
            "subtotal": 104189,            // $1,041.89
            "tax": 2109,                   // $21.09
            "date": "2024-01-19 18:47:12"  // Jan 19, 2024, 1:47pm EST
        },
        // update existing transaction
        {
            "cid": "123ABC",
            "tid": "456zzY",
            "total": 412350,  // $4,123.50
        }
    ]
}
Options Default Description
callback - A complete https url where you want to receive a webhook callback when a query batch has been completed.
Transaction property Required? Description
cid Required Customer ID.
STRING
tid Optional Transaction ID.
STRING
total Required Full transaction amount, in cents.
INT
subtotal Optional Amount before taxes/fees, in cents.
INT
tax Optional Taxes in cents.
INT
date Optional Transaction date in UTC timezone.
STRING (format: YYYY-MM-DD HH:MM:SS)
Response OK 200

Queued

Posted transactions are queued and processed in the background.

{
    "status": 200,
    "message": "2 transactions received",
    "runId": "EZmKByjAvm"
}