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

# Get Onramp

> GET /v2/onramp/{id} — retrieve a single onramp transaction by its end2end ID.

This route returns several kinds of process. `onramp` (BRL → balance) and `onramp_instant` (BRL → external wallet) share the attribute set below; `onramp_instant_legacy` is an older variant of `onramp_instant` with the same attributes. Fields marked with a template name are only present for that variant.

`GET /v2/onramps` **also returns merchant BRL funding deposits**, which use a completely different set of attribute keys — see [Merchant BRL funding](#merchant-brl-funding) below. There is no type field to switch on, so branch on the attribute keys: `gateway_payment_id` marks a funding deposit, `quote` marks an onramp.

## Path parameters

| Parameter | Description                                                                                          |
| --------- | ---------------------------------------------------------------------------------------------------- |
| `id`      | The `end2end` identifier (e.g. `NOXabc456`), the `pix_e2e` of the payment, or the on-chain `tx_hash` |

If `{id}` does not match an `end2end`, it is retried against the Pix end-to-end ID and then the transaction hash — so all three work on the same route with no extra parameter.

## Response `200 OK`

### Attributes

| Field                         | Type   | Template         | Description                                                            |
| ----------------------------- | ------ | ---------------- | ---------------------------------------------------------------------- |
| `quote`                       | float  | all              | Effective BRL→crypto exchange rate used                                |
| `ref_quote`                   | float  | all              | Mid-market reference rate                                              |
| `fees`                        | float  | all              | Total fees (BRL)                                                       |
| `currency_entry`              | string | all              | Source currency — always `BRL`                                         |
| `currency_exit_received`      | string | all              | Destination asset display name (e.g. `USDT (TRX)`)                     |
| `currency_exit_received_code` | string | all              | Destination currency code                                              |
| `amount_payment`              | float  | all              | BRL amount paid                                                        |
| `amount_received`             | float  | all              | Crypto amount received                                                 |
| `pix_e2e`                     | string | all              | PIX end-to-end ID (populated after payment)                            |
| `client_name`                 | string | all              | Customer name                                                          |
| `client_tax_id`               | string | all              | Customer CPF or CNPJ                                                   |
| `expiration`                  | string | all              | Session expiration timestamp (ISO 8601)                                |
| `return_url`                  | string | all              | Post-checkout redirect URL                                             |
| `external_code`               | string | all              | Merchant reference                                                     |
| `webhook`                     | string | all              | Webhook URL                                                            |
| `template`                    | string | all              | Template name (`onramp`, `onramp_instant`, or `onramp_instant_legacy`) |
| `wallet`                      | string | `onramp_instant` | Destination wallet address                                             |
| `tx_hash`                     | string | `onramp_instant` | On-chain transaction hash of the delivery                              |
| `network_fee`                 | string | `onramp_instant` | Blockchain network fee charged                                         |

An attribute with an empty value is omitted, so a missing key — `pix_e2e` before payment, for instance — means that step has not happened yet.

## Merchant BRL funding

A BRL deposit you make into your own account is a distinct process that this route also returns. Its attributes share almost no keys with an onramp, so check for `gateway_payment_id` before reading them.

| Field                | Type   | Description                                                                                                               |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `gateway_payment_id` | string | Payment identifier at the acquiring gateway                                                                               |
| `end2end`            | string | Pix end-to-end ID of the deposit. Note this is an *attribute* named `end2end`, distinct from the envelope's own `end2end` |
| `amount`             | float  | Amount deposited, in BRL                                                                                                  |
| `bank`               | string | Originating bank                                                                                                          |
| `paid_at`            | string | When the deposit settled                                                                                                  |
| `error_detail`       | string | Client-facing explanation, when the deposit failed                                                                        |
| `limit_block_source` | string | Which gate blocked it, when a ceiling was hit: `operational` or `compliance`                                              |

<Note>
  Responses from this route carry `version: "v1"` in the envelope. It is an inherited label, not a contract version — this is a `/v2/` route on the same contract as every other. Do not branch on it.
</Note>

**`404`** — transaction not found or does not belong to your account. The two cases are deliberately indistinguishable.

For all `status` / `substatus` values see [Onramp statuses](/api-reference/reference/statuses#onramp).

<RequestExample>
  ```bash cURL theme={null}
  curl https://checkout.noxpay.io/v2/onramp/NOXabc456 \
    -H "api-key: <key>"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://checkout.noxpay.io/v2/onramp/NOXabc456",
      headers={"api-key": "<key>"},
  )
  print(response.json())
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://checkout.noxpay.io/v2/onramp/NOXabc456",
    { headers: { "api-key": "<key>" } }
  );
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "version": "v1",
    "end2end": "NOXabc456",
    "created_at": "2024-05-01T10:00:00Z",
    "updated_at": "2024-05-01T10:08:00Z",
    "process": "success.completed",
    "status": { "en": "Success", "pt": "Sucesso", "es": "Éxito" },
    "substatus": { "en": "Success", "pt": "Sucesso", "es": "Éxito" },
    "message": { "en": "Transaction completed successfully", "pt": "Transação concluída com sucesso", "es": "Transacción completada con éxito" },
    "error_message": { "en": "", "pt": "", "es": "" },
    "attributes": {
      "quote": 5.45,
      "ref_quote": 5.30,
      "fees": 10.00,
      "currency_entry": "BRL",
      "currency_exit_received": "USDT (TRX)",
      "currency_exit_received_code": "TRX_USDT_S2UZ",
      "amount_payment": 550.00,
      "amount_received": 100.00,
      "pix_e2e": "E00038166202405011000...",
      "client_name": "Maria Souza",
      "client_tax_id": "98765432100",
      "expiration": "2024-05-01T10:30:00Z",
      "return_url": "https://yourapp.com/done",
      "external_code": "ref_99",
      "webhook": "https://yourapp.com/webhooks/nox",
      "template": "onramp_instant",
      "wallet": "TXyZ...abc",
      "tx_hash": "0xabc123...",
      "network_fee": "1.00"
    }
  }
  ```
</ResponseExample>
