> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/e5fdc10a-d7fa-4687-a6f7-56c29f5d507c/thales-tsh-transaction-notification-passthrough-api/from-thales-to-transaction-processor.md).

# From Thales to Transaction Processor

## Retrieve Token Transactions

> TSH retrieves the last transactions associated to the tokens digitized in a same device.\
> The reponse time for this operation shall be very fast.\
> In case a transactionId in the request is unknown, it shall be ignored.\
> In case there is no transaction data associated to the transactionIds in the request, an empty array shall be returned.\
> Note that this operation may be called several times for the same transactionIds in a short period of time.<br>

```json
{"openapi":"3.1.1","info":{"title":"Thales TSH Transaction Notification Passthrough API","version":"1.7"},"paths":{"/retrieve-token-transactions":{"post":{"tags":["From Thales TSH to Transaction Processor"],"summary":"Retrieve Token Transactions","description":"TSH retrieves the last transactions associated to the tokens digitized in a same device.\nThe reponse time for this operation shall be very fast.\nIn case a transactionId in the request is unknown, it shall be ignored.\nIn case there is no transaction data associated to the transactionIds in the request, an empty array shall be returned.\nNote that this operation may be called several times for the same transactionIds in a short period of time.\n","operationId":"retrieve-token-transactions","parameters":[{"$ref":"#/components/parameters/xRequestId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"$ref":"#/components/schemas/transactions"}},"required":["transactions"]}}}},"400":{"description":"Bad request - Not Retryable","content":{"application/json":{"schema":{"type":"object","description":"Error Information Response. It is not always provided in the HTTP response.","properties":{"errorCode":{"type":"number","description":"Error Response code to the request\n|Error code | Description |\n|-------|-------|\n|111|Missing mandatory parameter|\n|112|Bad parameter format|\n"},"errorMessage":{"type":"string","description":"Textual error message."}}}}}},"500":{"$ref":"#/components/responses/undefined"},"503":{"$ref":"#/components/responses/undefined"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transactionIds":{"$ref":"#/components/schemas/transactionIds"}},"required":["transactionIds"]}}}}}}},"components":{"parameters":{"xRequestId":{"schema":{"type":"string","maxLength":64},"name":"x-request-id","in":"header","description":"Technical identifier used to trace one function call, request and\nresponse. \nIt shall be different for each function call. \nThe identifier is returned in the HTTP response header.\n","required":true}},"schemas":{"transactions":{"type":"array","description":"Information about the last transactions performed by the tokens in the device.\nShall be ordered from the most recent transaction to the eldest.\n","items":{"$ref":"#/components/schemas/transaction"}},"transaction":{"type":"object","description":"All the information related to a transaction.","properties":{"transactionId":{"$ref":"#/components/schemas/transactionId"},"linkedTransactionId":{"$ref":"#/components/schemas/linkedTransactionId"},"tokenId":{"$ref":"#/components/schemas/tokenId"},"dpanIdentifier":{"$ref":"#/components/schemas/dpanIdentifier"},"transactionType":{"$ref":"#/components/schemas/transactionType"},"walletProviderTransactionId":{"$ref":"#/components/schemas/walletProviderTransactionId"},"transactionResult":{"$ref":"#/components/schemas/transactionResult"},"transactionResultReason":{"$ref":"#/components/schemas/transactionResultReason"},"totalAmount":{"$ref":"#/components/schemas/totalAmount"},"currency":{"$ref":"#/components/schemas/currency"},"merchantName":{"$ref":"#/components/schemas/merchantName"},"merchantId":{"$ref":"#/components/schemas/merchantId"},"merchantCity":{"$ref":"#/components/schemas/merchantCity"},"merchantZip":{"$ref":"#/components/schemas/merchantZip"},"merchantCountryCode":{"$ref":"#/components/schemas/merchantCountryCode"},"industryCategory":{"$ref":"#/components/schemas/industryCategory"},"industryCode":{"$ref":"#/components/schemas/industryCode"},"transactionDate":{"$ref":"#/components/schemas/transactionDate"}},"required":["transactionId","tokenId","transactionType","transactionResult","currency","merchantName","merchantId","transactionDate"]},"transactionId":{"type":"string","description":"The unique transaction identifier.","maxLength":64},"linkedTransactionId":{"type":"string","description":"The transactionId of a previous purchase, in case of refund.<br/>Applicable to Google Pay only.","maxLength":64},"tokenId":{"type":"string","description":"The unique token identifier.","maxLength":64},"dpanIdentifier":{"type":"string","description":"**Applicable to Apple Pay**. <br/>The DPAN identifier. Shall be used for auxiliary token only.\n","maxLength":64},"transactionType":{"type":"string","enum":["PURCHASE","REFUND"],"description":"Transaction type."},"walletProviderTransactionId":{"type":"string","description":"The format of the transaction identifier is in the format expected by the Wallet Provider. Conditional to Wallet Provider expectation.\n### **Apple Pay Transaction Identifier**:\n#### In case of EMV Transaction\n- Concatenate the TOKEN DPAN, the ATC value and the ARQC\n- Compute a SHA256 over the concatenated value\n*walletProviderTransactionId = SHA-256 (DPAN | ATC | Application Cryptogram)*\n#### In case of mCommerce Transaction\n- Concatenate the TOKEN DPAN, the ATC value and the Remote Payment Cryptogram\n- Compute a SHA256 over the concatenated value\n*walletProviderTransactionId = SHA-256 (DPAN | ATC | Remote Payment Cryptogram)*\n#### In case of MagStripe Transaction:\n- Concatenate 16-Less Significant Byte of SHA256  of Track 1 Data with 16-Less Significant Byte of the SHA-256  of Track 2 Data\n*walletProviderTransactionId = 16-LSB (SHA-256 (Track 1 Data)) | 16-LSB (SHA-256 (Track 2 Data))*\n#### In case of QuicPay Transaction:\n*walletProviderTransactionId = MSB16( SHA-256( Card ID | ATC | Expiration Date)) | 16x '00'*\n### **Google Pay Transaction Identifier**:\n#### In case of EMV Transaction\n*walletProviderTransactionId = ATC*\n","maxLength":64},"transactionResult":{"type":"string","enum":["APPROVED","PENDING","REFUNDED","DECLINED"],"description":"Transaction result status."},"transactionResultReason":{"type":"number","description":"Transaction result status reason. Provided if the transaction result is 'DECLINED' and for Google Pay solution."},"totalAmount":{"type":"number","description":"Transaction amount.","format":"double"},"currency":{"type":"string","description":"ISO 4217 currency format numeric code.","maxLength":3},"merchantName":{"type":"string","description":"The merchant name.","maxLength":32},"merchantId":{"type":"string","description":"The merchant identifier used to uniquely identify a merchant in a POS transaction.","maxLength":32},"merchantCity":{"type":"string","description":"Merchant Address - city.","maxLength":128},"merchantZip":{"type":"string","description":"Merchant Address - zip code.","maxLength":10},"merchantCountryCode":{"type":"string","description":"ISO 3166 Alpha 2 format.","minLength":2,"maxLength":2},"industryCategory":{"type":"string","description":"Used to describe what type of category the merchant falls into.","maxLength":16},"industryCode":{"type":"string","description":"The industry category should be described using the ISO 18245 code, if possible.","maxLength":16},"transactionDate":{"type":"string","description":"Date time of the transaction in RFC3339 format.","maxLength":32},"transactionIds":{"type":"array","description":"Array of transaction identifiers.","items":{"$ref":"#/components/schemas/transactionId"}}},"responses":{"undefined":{"description":"Service Unavailable - Retryable"}}}}
```

## Healthcheck Transaction Processor

> This method shall be used to check the server availability.

```json
{"openapi":"3.1.1","info":{"title":"Thales TSH Transaction Notification Passthrough API","version":"1.7"},"paths":{"/healthcheck-transaction-processor":{"get":{"tags":["From Thales TSH to Transaction Processor"],"summary":"Healthcheck Transaction Processor","description":"This method shall be used to check the server availability.","operationId":"healthcheck-transaction-processor","parameters":[{"$ref":"#/components/parameters/xRequestId"}],"responses":{"204":{"$ref":"#/components/responses/undefined"}}}}},"components":{"parameters":{"xRequestId":{"schema":{"type":"string","maxLength":64},"name":"x-request-id","in":"header","description":"Technical identifier used to trace one function call, request and\nresponse. \nIt shall be different for each function call. \nThe identifier is returned in the HTTP response header.\n","required":true}},"responses":{"undefined":{"description":"Service Unavailable - Retryable"}}}}
```


---

# 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.payments.thalescloud.io/e5fdc10a-d7fa-4687-a6f7-56c29f5d507c/thales-tsh-transaction-notification-passthrough-api/from-thales-to-transaction-processor.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.
