> For the complete documentation index, see [llms.txt](https://docs.payshield.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payshield.ai/txfind-payreveal-order-insight-ican/transaction-lookup-history.md).

# Transaction Lookup History

## Get merchant lookup history

> Returns filtered lookup records for a given merchant. Requires a valid JWT token. The merchantId in the path must match one of the associated merchants from the token.<br>

```json
{"openapi":"3.0.1","info":{"title":"TxFind API's Version 2 Endpoints","version":"2.0.0"},"tags":[],"servers":[{"url":"https://{baseUrl}","description":"Current server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/api/v2/merchant/{merchantId}/lookupHistory":{"post":{"summary":"Get merchant lookup history","description":"Returns filtered lookup records for a given merchant. Requires a valid JWT token. The merchantId in the path must match one of the associated merchants from the token.\n","tags":["Merchant Lookup"],"parameters":[{"name":"merchantId","in":"path","required":true,"description":"Merchant ID to query lookup history for","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sortField":{"type":"string"},"order":{"type":"string","enum":["ASC","DESC"]},"field":{"type":"array","items":{"type":"string","enum":["txShieldOICartReference","provider","service","lookupReference","cardBin","cardLast4","transactionDate","lookupDate"]},"description":"Fields to apply filters on. This array must be the same length as `value` and `operator`, \nwith each index corresponding to a filter condition. \nFor example, field[0] + operator[0] + value[0] form a complete filter clause.\n"},"value":{"type":"array","items":{"type":"string"},"description":"Values to compare against each `field`, matched by index. \nFor example, value[0] applies to field[0] using operator[0].\n"},"operator":{"type":"array","items":{"type":"string"},"description":"Operators used for each filter condition. Must match the `field` and `value` array indexes.\n"},"dateFrom":{"type":"string","format":"date-time"},"dateTo":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Successful response with list of lookups","content":{"application/json":{"schema":{"type":"object","properties":{"datalist":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"txShieldOICartReference":{"type":"string"},"provider":{"type":"string"},"service":{"type":"string"},"lookupReference":{"type":"string"},"cardBin":{"type":"string","nullable":true},"cardLast4":{"type":"string","nullable":true},"transactionDate":{"type":"string","format":"date-time","nullable":true},"lookupDate":{"type":"string","format":"date-time"},"receivedData":{"type":"object","properties":{"source":{"type":"string"},"cardBin":{"type":"string"},"cardLast4":{"type":"string"},"transactionDate":{"type":"string","format":"date-time"},"transactionAmount":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}}},"authCode":{"type":"string"},"terminalId":{"type":"string"},"cardAcceptorId":{"type":"string"},"transactionId":{"type":"string"},"transactionType":{"type":"string"},"paymentDescriptor":{"type":"string"},"paymentDescriptorContact":{"type":"string"},"acquirerBin":{"type":"string"},"mcc":{"type":"string"},"verifiEntityInfo":{"type":"object","properties":{"partnerId":{"type":"integer"},"clientId":{"type":"integer"}}},"transactionRequestId":{"type":"string"},"paymentType":{"type":"string"},"insightId":{"type":"string"},"purchaseIdentifier":{"type":"string"}}},"returnData":{"type":"object","properties":{"receipt":{"type":"object","properties":{"paymentInformation":{"type":"object","properties":{"paymentTotalAmount":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}}}}},"productsPurchasedList":{"type":"array","items":{"type":"object","properties":{"productDescription":{"type":"string"},"unitPriceAmount":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}}},"quantity":{"type":"integer"}}}}}},"merchantInformation":{"type":"object","properties":{"merchantName":{"type":"string"},"merchantUrl":{"type":"string"},"merchantContactPhone":{"type":"string"},"storeDetails":{"type":"object","properties":{"storeName":{"type":"string"}}}}},"customerInformation":{"type":"object","properties":{"accountId":{"type":"string"}}},"deliveryAddress":{"type":"object","properties":{"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}},"device":{"type":"object","properties":{"ipAddress":{"type":"string"}}}}},"errorMessage":{"type":"string","nullable":true},"merchantCart":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"txShieldOICartReference":{"type":"string"},"transactionDate":{"type":"string","format":"date-time"},"cardBin":{"type":"string"},"cardLast4":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"paymentDescriptor":{"type":"string"},"merchantId":{"type":"string"},"dateCreated":{"type":"string","format":"date-time"},"email":{"type":"string"},"alertHappened":{"type":"boolean"},"alertReference":{"type":"string","nullable":true},"chargebackHappened":{"type":"boolean"},"chargebackReference":{"type":"string","nullable":true}}}},"merchantId":{"type":"string"},"merchantName":{"type":"string"}}}},"total":{"type":"integer"}}}}}},"400":{"description":"Bad Request - Missing merchantId or invalid format","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"403":{"description":"Forbidden - Token not authorized for this merchant","content":{"application/json":{"schema":{"type":"object","properties":{"msg":{"type":"string"}}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payshield.ai/txfind-payreveal-order-insight-ican/transaction-lookup-history.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
