# Get transaction by reference

> GET /api/v1/transactions/{reference}

Source: https://useroutegate.com/docs/api/public/getTransactionByReference

Authenticate with a bearer API key (`rg_test_` in test mode, `rg_live_` in live).

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `reference` | path | string | yes |  |

## Request

```bash
curl -X GET https://api.useroutegate.com/api/v1/transactions/rg_tx_01J8QX4M2K9R7V3N \
  -H "Authorization: Bearer $ROUTEGATE_API_KEY"
```

## Response

`200`

```json
{}
```

## Error

`404` Error envelope

```json
{
  "success": false,
  "data": "<data>",
  "message": "<message>",
  "code": "<code>"
}
```

## Give this to your coding agent

Read `https://useroutegate.com/docs/api/public/getTransactionByReference.md` and implement this call. Keep one `Idempotency-Key` per attempt at the same order, treat `202` as accepted and resolve the final state from the webhook. Amounts are integers in kobo.
