# Query Cash-In by E2E ID

Queries a PIX transaction by its End-to-End ID (BACEN unique identifier).

## Endpoint

```
GET /api/external/transactions/e2e/:e2e_id
```

## Headers

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| `Authorization` | String | Yes | `ApiKey {client_id}:{client_secret}` |
| `X-Key-Case` | String | No | Set to `camelCase` to receive response fields in camelCase (default is snake_case) |

## Path Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `e2e_id` | String | Yes | Transaction End-to-End ID (BACEN format, regex `^E\d{8}[a-zA-Z0-9]{22,26}$`) |

::: tip E2E ID format (BACEN)
The E2E ID follows the BACEN standard: `E` + **ISPB** (8 numeric digits) + **UTC timestamp** (13 numeric digits) + **alphanumeric identifier** (9-13 characters, **may contain letters and numbers**).

Valid examples:

- `E46026562202603071530000001` -- all numeric (emitted by systems that use only digits)
- `E18236120202604221900s1218936740` -- contains letters (emitted by Nubank, ISPB `18236120`)
- `E60746948202604091234A2004l6Agm0` -- typical alphanumeric (uppercase and lowercase letters are valid)

**Attention:** never assume the E2E is fully numeric -- issuing banks may use letters. Your integration must accept the regex `^E\d{8}[a-zA-Z0-9]{22,26}$`.
:::

## Example

```bash
curl -X GET https://api.monetarie.com/api/external/transactions/e2e/E46026562202603071530000001 \
  -H "Authorization: ApiKey $CLIENT_ID:$CLIENT_SECRET"
```

## Success Response (200)

```json
{
  "worked": true,
  "data": {
    "id": "a1b2c3d4e5f64a7b8c9d0e1f2a3b4c5d",
    "transaction_id": "7popu57v6us7p6pcicgq12345",
    "end_to_end_id": "E46026562202603071530000001",
    "external_id": "order-9876",
    "type": "pix",
    "status": "settled",
    "amount": 300000,
    "fee_amount": 0,
    "net_amount": 300000,
    "description": "Pedido #1234",
    "direction": "inbound",
    "counterparty_name": "Maria Santos",
    "payer_document": "12345678901",
    "recipient_document": "46026562000165",
    "recipient_key": "contato@empresa.com.br",
    "payer_ispb": "60701190",
    "payer_bank_name": "ITAU UNIBANCO S.A.",
    "created_at": "2026-03-07T15:30:00Z",
    "completed_at": "2026-03-07T15:30:02Z"
  }
}
```

This endpoint returns the same transaction object described in [Query by ID](/en/pix-cashin-status) -- including the alternate forms `processing` (PIX OUT in flight, with nested `recipient` object) and `failed` (with `reason_code` + `reason_description`). All monetary values are in **base units** (÷ 10,000 for BRL).

## Error Response (404)

```json
{
  "worked": false,
  "detail": "Transação não encontrada para o E2E informado"
}
```

## Error Response (401)

```json
{
  "error": {
    "status": 401,
    "message": "Missing API key credentials. Use Authorization: ApiKey <client_id>:<client_secret>"
  }
}
```

::: warning Cash-In and Cash-Out
This endpoint returns both inbound and outbound transactions. Use the `direction` field to differentiate: `inbound` (receiving) or `outbound` (sending).
:::
