> For the complete documentation index, see [llms.txt](https://cardknox.gitbook.io/sola-dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cardknox.gitbook.io/sola-dev-docs/api-reference/reporting-api/transaction-reports.md). Agents can also search and read this documentation through its [MCP server](https://cardknox.gitbook.io/sola-dev-docs/~gitbook/mcp).

# Transaction Reports

## Report Transaction

> \*\*Path\*\*: \`/reportjson\` \*\*xCommand\*\*: \`report:transaction\` POST to \*\*\`/reportjson\`\*\* with \*\*\`xCommand\`\*\* = \`report:transaction\` to run \*\*Report Transaction\*\*. Use this endpoint to retrieve a single transaction by reference number. You can optionally request a receipt to be sent by providing receipt-related fields (such as \`xEmail\` and \`xHTMLReceipt\`). This is commonly used for customer support, reconciliation, and operational lookup flows.<br>

```json
{"openapi":"3.0.3","info":{"title":"Sola Payments - Transaction Reports APIs","version":"5.0.0"},"tags":[{"name":"Transaction Reports"}],"servers":[{"url":"https://x1.cardknox.com","description":"Default API host"}],"paths":{"/reportjson":{"post":{"summary":"Report Transaction","description":"**Path**: `/reportjson` **xCommand**: `report:transaction` POST to **`/reportjson`** with **`xCommand`** = `report:transaction` to run **Report Transaction**. Use this endpoint to retrieve a single transaction by reference number. You can optionally request a receipt to be sent by providing receipt-related fields (such as `xEmail` and `xHTMLReceipt`). This is commonly used for customer support, reconciliation, and operational lookup flows.\n","operationId":"API_070_reporttransaction","tags":["Transaction Reports"],"deprecated":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"xKey":{"type":"string","description":"Your Sola API key."},"xVersion":{"type":"string","description":"Gateway API version (e.g. 5.0.0)."},"xSoftwareName":{"type":"string","description":"Name of your software."},"xSoftwareVersion":{"type":"string","description":"Version number of your software."},"xCommand":{"type":"string","description":"Sola report type. Use report:transaction."},"xRefNum":{"type":"string","description":"Reference number of the transaction (single or comma-delimited for multiple). Required for single-transaction lookup."},"xEmail":{"type":"string","description":"Email address for receipt delivery. Required when sending a receipt for the transaction."},"xHTMLReceipt":{"type":"string","description":"Optional. Receipt template ID when sending receipt (numeric)."},"xBeginDate":{"type":"string","description":"Optional. Begin date when constraining by date range.","format":"YYYY-MM-DD or YYYY-MM-DD HH:MM:SS"},"xEndDate":{"type":"string","description":"Optional. End date when constraining by date range.","format":"YYYY-MM-DD or YYYY-MM-DD HH:MM:SS"},"xFields":{"type":"string","description":"Optional. Comma-separated field names to return in xReportData."},"xInvoice":{"type":"string","description":"Invoice number for transaction lookup (alternative to xRefNum)."}},"required":["xKey","xVersion","xSoftwareName","xSoftwareVersion","xCommand","xRefNum"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"xResult":{"type":"string","description":"Result code (e.g. A = Approved)."},"xStatus":{"type":"string","description":"Status (e.g. Approved)."},"xError":{"type":"string","description":"Error message if any."},"xRefNum":{"type":"string","description":"Reference number for the report request or transaction."},"xRecordsReturned":{"type":"string","description":"Number of records returned (typically 1 for single transaction)."},"xReportData":{"type":"string","description":"Transaction details (columns depend on xFields or default mapping)."},"xReportURL":{"type":"string","description":"Download URL when xReturnDownloadURL is true (valid ~5 minutes)."},"xReportingMaxTransactions":{"type":"string","description":"Maximum transactions allowed for report (e.g. 5000)."}}}}}}}}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cardknox.gitbook.io/sola-dev-docs/api-reference/reporting-api/transaction-reports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
