Pagination in Transaction Inquiries

Since the result of an inquiry request could contain a large amount of data, the inquireTransactions command supports pagination. It is recommended to use pagination for faster response times when sending requests that may return a large number of results, such as date range inquiries.

When you use pagination in transaction inquiries, your initial request will differ from your subsequent requests.

Initial request

When sending the initial request, add the resultType parameter to the inquireTransactions command in your XML payload and set it to Paging.

Here's what your XML payload could look like for an initial request to inquire about transactions transmitted within a specific date range:

<ashrait>
    <request>
        <version>2000</version>
        <language>ENG</language>
        <command>inquireTransactions</command>
        <inquireTransactions>
            <terminalNumber>{terminalNumber}</terminalNumber>
            <resultType>Paging</resultType>
            <fromTransmitDate>2025-07-20</fromTransmitDate>
            <toTransmitDate>2025-08-01</toTransmitDate>
        </inquireTransactions>
    </request>
</ashrait>

Hyp API will return the first 50 matches in the transactions element, as well as the totals element containing pagination information such as the current page number (pageNumber) and total pages (pagesAmount). In this example, the total number of results (totalMatch) is 284, and the total number of pages (pagesAmount) is 6:

The queryResultId element under totals in the response is the identifier that you'll need to use in subsequent requests to retrieve additional pages of results.

Requests for subsequent pages

To retrieve additional pages of results, you need to send subsequent requests with the queryResultId value received in the initial response. In these requests, you also need to include the pageNumber parameter to specify which page you want to retrieve.

Following the example above, if you want to retrieve the second page of results, your XML payload should look like this:

The response will deliver 50 more results, and the totals element will still provide pagination information, including the current page number, total pages, and total matches:

You can continue to request additional pages by incrementing the pageNumber parameter until you reach the last page, as indicated by the pagesAmount value in the totals element.

If you attempt to specify a page that is beyond the total number of pages, the API will return a response with an empty transactions element.

Last updated

Was this helpful?