--- title: "Get transaction data from tx_store_report - C" url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/get-transaction-data-from-tx_store_report-c" source_url: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/get-transaction-data-from-tx_store_report-c.md" canonical: "https://docs.adyen.com/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/get-transaction-data-from-tx_store_report-c" last_modified: "2026-05-24T12:54:31+02:00" language: "en" --- # Get transaction data from tx\_store\_report - C [View source](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/extras-c-library/get-transaction-data-from-tx_store_report-c.md) ## Implement the callback Implement the `tx_store_query_CB` callback based on the signature in the **tx\_store\_report\_extern.h** file and  pass this as a parameter of the `tx_store_query` call. For more information on how to do this, see [Implement callbacks](/point-of-sale/classic-library-deprecation/classic-library-integrations/c-library-integration/calls-and-callbacks-c-library/implement-callbacks). ### Code example ```cpp void tx_store_query_CB(tx_store_query_response *p, void *echo_struct) ``` ## Allocate the request structure Use `tx_store_query_allocate` to allocate, initialize and return a `tx_store_query_request` structure. Populate the request by performing string duplication. If you want the data for later use, retain it, or it will be released automatically ## Call the tx\_store\_query function Use the `tx_store_query` function to retrieve the `tx_store_report`, which contains results from past transactions. ### Parameters | Name | Type | Required | Description | | ------------------------ | ------ | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `tx_store_query_request` | struct | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Struct that contains specific elements to retrieve a `tx_store_report`. For parameters and more information, see the `tx_store_query_request` page | | `tx_store_query_CB` | void | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Pointer to a callback function you implemented which includes the `tx_store_query_response`. | | `echo_struct` | struct | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | A POS-defined struct that is echoed back in the callback. Use this to share a POS data struct between the call to the library and the callback from the library. You can add any pointer to `echo_struct`, and this will be returned on its specific callback. | ## Handle the callback The `tx_store_query` callback returns a response which includes the  `tx_store_report`. ### Parameters | Name | Description | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `tx_store_query_response` | The immediate response to the` tx_store_query` call, which includes the result of the call. This includes the  `tx_store_report` object. | | `echo_struct` | A pointer to a user-defined struct that is echoed back in the callback. Use this to share a POS data struct between the call to the library and the callback from the library. | A `pspReference` and `authCode` will not be visible if the transaction was performed offline.