> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ecrypt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transactions

The Reporting API lets you fetch transaction details directly from ECRYPT and display in your own environment.

## Authentication

All Reporting API requests require a **Reporting API key** passed in the request header. This is a separate key from your standard private API key.

```http theme={null} theme={null}
X-Api-Key: {{reporting_api_key}}
```

Reporting API keys can be created in the ECRYPT Dashboard under **Settings** > **Account Settings** > **Developer Tools** > **API/Security Keys**.

***

## Get a Transaction

Fetch the details of a single transaction by its ID.

```http theme={null} theme={null}
GET https://reportinguiapi.v2.ecrypt.com/api/transactions/{{transaction_id}}
```

### Request

```http theme={null} theme={null}
GET /api/transactions/230021901 HTTP/1.1
Host: reportinguiapi.v2.ecrypt.com
X-Api-Key: {{reporting_api_key}}
```

### Response

```json theme={null} theme={null}
{
  "transactionId": 230021901,
  "type": "SALE",
  "tender": "CREDITCARD",
  "paymentName": "A TEST",
  "paymentNetwork": "MC",
  "paymentAccount": "5***********1111",
  "paymentAccountExpiry": "1025",
  "amount": 29.95,
  "authorizationAmount": 29.95,
  "capturedAmount": 29.95,
  "gratuityAmount": 0.00,
  "surchargeAmount": 0.00,
  "settlementAmount": 29.95,
  "approvalCode": "123456",
  "avsCode": "N",
  "cvvCode": "M",
  "status": "SETTLED",
  "created": "2024-09-30T17:55:23"
}
```

### Response Fields

| Field                    | Description                                         |
| ------------------------ | --------------------------------------------------- |
| `transactionId`          | Unique transaction identifier                       |
| `type`                   | Transaction type (e.g., `SALE`, `REFUND`, `VOID`)   |
| `tender`                 | Payment method used (e.g., `CREDITCARD`, `ACH`)     |
| `paymentName`            | Name on the payment method                          |
| `paymentNetwork`         | Card network (e.g., `VI` = Visa, `MC` = Mastercard) |
| `paymentAccount`         | Masked account or card number                       |
| `paymentAccountExpiry`   | Card expiration in `MMYY` format                    |
| `paymentAccountRouting`  | Bank routing number (ACH transactions)              |
| `amount`                 | Total transaction amount                            |
| `authorizationAmount`    | Amount authorized                                   |
| `capturedAmount`         | Amount captured                                     |
| `gratuityAmount`         | Tip amount                                          |
| `surchargeAmount`        | Surcharge amount                                    |
| `settlementAmount`       | Amount settled                                      |
| `voidedAmount`           | Amount voided                                       |
| `referenceTransactionId` | ID of the original transaction, if applicable       |
| `approvalCode`           | Issuer approval code                                |
| `avsCode`                | AVS response code                                   |
| `cvvCode`                | CVV response code                                   |
| `enhanced`               | Whether Level 2/3 data was submitted                |
| `status`                 | Transaction status (e.g., `SETTLED`, `VOIDED`)      |
| `created`                | Timestamp the transaction was created (UTC)         |
