Examples of Transaction Inquiries

This page provides several examples of using the inquireTransactions command with different identifiers, as well as with date ranges.

Using the "cgUid" identifier

When you send an inquiry request using the cgUid identifier, the Hyp API returns all technical transactions related to the same financial transaction.

This includes payment page requests. Normally, you can retrieve a cgUid value from the query string parameters in the payment completion redirect. If you then use this value for a transaction inquiry, Hyp will return two transaction elements in the response: one for the initial payment page request and another for the actual debit transaction.

Another example would be a debit transaction that is later refunded: both the debit and the refund request will share the same cgUid value.

Suppose that after a successful payment using Hyp's payment page, you as a merchant receive and save a cgUid value of 119187087. You can then use this value to inquire about all transactions related to this identifier by including the following XML payload in the int_in parameter:

<ashrait>
    <request>
        <version>2000</version>
        <language>ENG</language>
        <command>inquireTransactions</command>
        <inquireTransactions>
            <terminalNumber>{terminalNumber}</terminalNumber>
            <cgUid>119187087</cgUid>
        </inquireTransactions>
    </request>
</ashrait>

The response will include two transactions: one representing the initial payment page request (where the validation element has the value TxnSetup) and the other representing a one-phase sale (where validation is set to AutoComm).

Show response

Using the "tranId" identifier

If you're using the tranId identifier for a transaction inquiry, you will always receive a single transaction element in the response. This is because tranId is a unique identifier for each technical transaction processed by Hyp, and it is never shared across multiple steps of a financial transaction.

tranId is not returned in the query string of the payment completion redirect. Instead, you need to retrieve it from the response to a transaction inquiry that uses a different search criterion, such as cgUid or user.

Here is a sample XML payload you can pass in the int_in parameter to search by a tranId value of 119187092:

The response will include exactly one transaction:

Show response

Using the "user" field

It's a good practice to include a unique identifier in the user field of all your payment page requests. This value should match the user ID from your customer database or another internal system. Note that this approach only works if the user ID is no more than 19 digits long.

If you follow this practice, you can use the user field as a lookup element when performing transaction inquiries:

This user has only made one online purchase, so the response will include two transactions: one for the initial payment page request, and another for the one-phase sale.

Show response

Using a date range

The inquireTransactions command supports search by one of three pairs of lookup elements representing date ranges:

  • fromDealDate and toDealDate to search for transactions by the date they were performed by Hyp.

  • fromTransmitDate and toTransmitDate to search by the date they were transmitted to Shva.

  • fromShiftTxnDate and toShiftTxnDate to search by the ShiftTxnDate field in the original transaction request.

In all cases, you must specify both the from and to elements. By default, Hyp allows date ranges of up to 10 days.

For example, to search for transactions performed by Hyp between August 1 and August 8, 2025, include the fromDealDate and toDealDate elements in your XML payload like this:

The date ranges are inclusive. If you need to search for transactions within a single day, simply set both the from and to elements to the same date.

Date range–based inquiries may return many results. For performance reasons, it's recommended to use pagination in these cases. For a full example of a paginated date range search, see Pagination in Transaction Inquiries.

Last updated

Was this helpful?