# Retrieve transaction

> Returns the full data of a transaction, by Rapid's ID or by your system's ID, including items, customer, addresses, payments and refunds.

Página: https://doc.rapidchargeback.com/en/canais/transactions/consultar-transacao/

Returns the full data of a transaction, including items, customer, addresses, payments and refunds. You can search by the ID Rapid returned at creation or, if you did not keep it, [by your system's ID](#by-your-systems-id).

## Endpoint

```
GET https://api.rapidchargeback.com/api/v1/transactions/:id
```

## Authentication

```
Authorization: Basic base64(client_id:client_secret)
```

---

## URL parameter

| Parameter | Type | Description |
|---|---|---|
| `id` | string (UUID) | Transaction ID |

---

## Request example

```bash
curl -X GET https://api.rapidchargeback.com/api/v1/transactions/00000000-0000-0000-0000-000000000042 \
  -H "Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ="
```

---

## Response examples

### Success

```json
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000042",
    "company_id": "00000000-0000-0000-0000-0000000000c1",
    "merchant_id": "00000000-0000-0000-0000-000000000001",
    "external_id": "TXN-2026-001",
    "external_source": "shopify",
    "order_number": "ORD-001",
    "auth_code": "AUTH999",
    "arn": null,
    "network": "visa",
    "amount": "150.00",
    "currency": "USD",
    "transaction_date": "2026-04-01T15:30:00.000Z",
    "card_bin": "424242",
    "card_last4": "4242",
    "descriptor": "LOJA EXEMPLO",
    "ip_address": "203.0.113.10",
    "created_at": "2026-04-01T15:31:00.000Z",
    "updated_at": "2026-04-01T15:31:00.000Z",
    "transaction_items": [
      {
        "id": "...",
        "product_description": "Assinatura Premium - Mensal",
        "product_name": "Plano Premium",
        "quantity": 1,
        "unit_price": "150.00"
      }
    ],
    "transaction_customers": [
      {
        "id": "...",
        "first_name": "João",
        "last_name": "Silva",
        "email": "joao@exemplo.com"
      }
    ],
    "transaction_addresses": [
      {
        "id": "...",
        "type": "shipping",
        "street": "Rua das Flores",
        "number": "123",
        "city": "São Paulo",
        "state": "SP",
        "postal_code": "01001000",
        "country": "BRA"
      }
    ],
    "transaction_payments": [],
    "transaction_refunds": []
  }
}
```

### Transaction not found

```json
{
  "error": {
    "code": "TRANSACTION_NOT_FOUND",
    "message": "Transaction not found"
  }
}
```

---

## By your system's ID

If you did not keep the `id` Rapid returned at creation, find the transaction by the identifier **you** sent: `external_source` plus `external_id`. It is the same combination that prevents duplicates at creation, so the response has **at most one** transaction.

```
GET https://api.rapidchargeback.com/api/v1/transactions?external_source=shopify&external_id=TXN-2026-001
```

| Param | Type | Required | Description |
|---|---|---|---|
| `external_id` | string (up to 100) | Yes | The `external_id` sent at creation |
| `external_source` | string (up to 50) | No | The `external_source` sent at creation. Without it, `custom` applies, the same default as at creation |

This is **not** a transaction listing: without `external_id` the response is `422`. With the `id` in hand, [update](https://doc.rapidchargeback.com/en/canais/transactions/atualizar-transacao/) and [delete](https://doc.rapidchargeback.com/en/canais/transactions/deletar-transacao/) work as usual.

### Example

```bash
curl -G "https://api.rapidchargeback.com/api/v1/transactions" \
  --data-urlencode "external_source=shopify" \
  --data-urlencode "external_id=TXN-2026-001" \
  -H "Authorization: Basic Y2xpZW50X2lkOmNsaWVudF9zZWNyZXQ="
```

### Found

`200` with a one-item list, in the same format as the lookup by ID:

```json
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000042",
      "external_source": "shopify",
      "external_id": "TXN-2026-001",
      "...": "other fields, as in the lookup by ID"
    }
  ]
}
```

### Not found

`200` with an empty list. A transaction from another company also comes back empty: the search is always within yours.

```json
{ "data": [] }
```

### Without `external_id`

```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "external_id is required"
  }
}
```
