---
title: "Guide: Off-Ramp (Crypto to Fiat)"
description: "This guide walks you through a complete off-ramp flow — converting USDT to EUR via the Stablegate API. By the end, your customer will have EUR delivered to their bank account."
canonical_url: "https://docs.stablegate.com/docs/guide/integration-guides/offramp"
---
# Guide: Off-Ramp (Crypto to Fiat)

> This guide walks you through a complete off-ramp flow — converting USDT to EUR via the Stablegate API. By the end, your customer will have EUR delivered to their bank account.

This guide walks you through a complete off-ramp flow — converting USDT to EUR via the Stablegate API. By the end, your customer will have EUR delivered to their bank account.

**Scenario:** Your customer wants to sell 500 USDT, receiving EUR at their SEPA bank account.

## Prerequisites

Before you begin, make sure you have:

- [ ] API key configured
- [ ] Customer UUID (created via the [Customers API](https://docs.stablegate.com/docs/guide/customers))

## Flow Overview

1. **Register bank account** — register the customer's IBAN.
2. **Check route** — verify Ethereum/USDT → SEPA/EUR is available.
3. **Check fees** — calculate the fee for 500 USDT.
4. **Check limits** — confirm the amount is within limits.
5. **Create order** — submit the off-ramp order; attach the invoice if the order needs one.
6. **Customer deposit** — the customer sends USDT to the deposit address.
7. **Monitor status** — poll until the order reaches a terminal state.
8. **Complete** — EUR is delivered to the customer's bank account.

---

## Step 1: Register the Customer's Bank Account

Register the IBAN where the customer will receive EUR.

**Request:**

::code-switcher{body="{"iban":"DE89370400440532013000","holder_name":"Max Mustermann","name":"Main EUR Account","bank_name":"Commerzbank","bank_code":"COBADEFFXXX"}" method="POST" path="/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/bank-accounts/"}
```bash
curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/bank-accounts/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "iban": "DE89370400440532013000",
  "holder_name": "Max Mustermann",
  "name": "Main EUR Account",
  "bank_name": "Commerzbank",
  "bank_code": "COBADEFFXXX"
}'
```
::

**Response:**

```json
{
  "uuid": "ba1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e",
  "name": "Main EUR Account",
  "iban": "DE89370400440532013000",
  "bank_name": "Commerzbank",
  "bank_code": "COBADEFFXXX",
  "bank_country": "DEU",
  "bank_address": null,
  "holder_name": "Max Mustermann",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}
```

Save the `uuid` — you will use it when creating the order.

:note[If the bank account is already registered, skip this step and use the existing bank account UUID.]---

## Step 2: Check Exchange Route Availability

Verify that the Ethereum USDT → SEPA EUR route is currently available.

**Request:**

::code-switcher{body="{"source":{"rail":"ethereum","asset_code":"USDT"},"destination":{"rail":"sepa","asset_code":"EUR"}}" method="POST" path="/v1/exchange-routes/check/"}
```bash
curl https://api.stablegate.com/v1/exchange-routes/check/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "source": {
    "rail": "ethereum",
    "asset_code": "USDT"
  },
  "destination": {
    "rail": "sepa",
    "asset_code": "EUR"
  }
}'
```
::

**Response:**

```json
{
  "available": true,
  "route": {
    "source": {
      "rail": "ethereum",
      "asset": {
        "code": "USDT",
        "fraction_digits": 6
      }
    },
    "destination": {
      "rail": "sepa",
      "asset": {
        "code": "EUR",
        "fraction_digits": 2
      }
    }
  }
}
```

The route is available.

---

## Step 3: Calculate Fees

Check how much EUR the customer will receive for 500 USDT after fees.

**Request:**

::code-switcher{body="{"source":{"rail":"ethereum","asset":"USDT","amount":500},"destination":{"rail":"sepa","asset":"EUR"}}" method="POST" path="/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/check-fees/"}
```bash
curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/check-fees/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": 500
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR"
  }
}'
```
::

**Response:**

```json
{
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": "500.000000"
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": "473.25"
  },
  "commission": {
    "asset": "USDT",
    "amount": "10.00"
  },
  "exchange_rate": "0.966500"
}
```

**Display to the customer:**

- Sends: **500.00 USDT**
- Fee: **10.00 EUR**
- Exchange rate: **0.9665** (USDT/EUR)
- Receives: **~473.25 EUR** to their bank account

---

## Step 4: Verify Limits

Confirm the customer has sufficient limit capacity.

**Request:**

::code-switcher{body="{"source":{"rail":"ethereum","asset":"USDT","amount":500},"destination":{"rail":"sepa","asset":"EUR"}}" method="POST" path="/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/check-limits/"}
```bash
curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/check-limits/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": 500
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR"
  }
}'
```
::

**Response — the operation passes:**

```json
[]
```

The endpoint returns only the rules the operation breaks, so an empty array is the success case.

**Response — a limit is exceeded:**

```json
[
  {
    "limit_rule": {
      "uuid": "lr1a2b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
      "name": "Lifetime turnover",
      "scope": "period",
      "period": "lifetime",
      "rail_types": ["bank"],
      "rail_codes": null,
      "operation_types": ["funding", "payout"],
      "asset_codes": null
    },
    "limit_amount": "15000.00",
    "used_amount": "14500.00",
    "available_amount": "500.00",
    "excess_amount": "500.00",
    "error_msg": "Lifetime turnover is exceeded by 500 EUR (the current limit is 15000 EUR)"
  }
]
```

::note
**Any element in the array is a refusal**, even when `excess_amount` is `"0.00"`: the minimum-amount rule reports itself that way, and the reason sits in `error_msg`. Show the customer `available_amount` and suggest a smaller transaction.
::

---

## Step 5: Create the Off-Ramp Order

Submit the order using the bank account UUID from Step 1.

**Request:**

::code-switcher{body="{"source":{"rail":"ethereum","asset":"USDT","amount":500},"destination":{"rail":"sepa","asset":"EUR","client_account_uuid":"ba1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"}}" idempotency-key="order_c1d2e3f4_offramp_001" method="POST" path="/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/"}
```bash
curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: order_c1d2e3f4_offramp_001' \
  --data '{
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": 500
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR",
    "client_account_uuid": "ba1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
  }
}'
```
::

**Response:**

```json
{
  "uuid": "od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
  "reference": "SG-20250115-GHIJKL",
  "state": "new",
  "deposit_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": "500.000000",
    "deposit_bank_info": null,
    "transaction_hash": null,
    "deposit_status": null
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": "473.25",
    "client_account": "DE89370400440532013000"
  },
  "commission": {
    "asset": "USDT",
    "amount": "10.00"
  },
  "account": {
    "uuid": "ac1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "code": "TRD-001",
    "name": "Trading Account",
    "type": "trading"
  },
  "error_message": null,
  "third_party_document_required": false,
  "third_party_document_uuid": null,
  "created_at": "2025-01-15T10:50:00.000Z",
  "valid_until": "2025-01-15T11:50:00.000Z"
}
```

The critical fields for off-ramp are:

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Value
    </th>
    
    <th>
      Purpose
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        deposit_address
      </code>
    </td>
    
    <td>
      <code>
        0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18
      </code>
    </td>
    
    <td>
      Stablegate's Ethereum address where the customer sends USDT
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reference
      </code>
    </td>
    
    <td>
      <code>
        SG-20250115-GHIJKL
      </code>
    </td>
    
    <td>
      Order reference (not needed for crypto deposits, but useful for your records)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        valid_until
      </code>
    </td>
    
    <td>
      <code>
        2025-01-15T11:50:00.000Z
      </code>
    </td>
    
    <td>
      Deadline for the deposit
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        third_party_document_required
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Whether the order waits for an invoice (see below)
    </td>
  </tr>
</tbody>
</table>

### Payout to a Third-Party Account: Attach the Invoice

In this scenario the EUR goes to the customer's own IBAN registered in Step 1, so no invoice is needed. When Stablegate treats the payout account as a third party's and the order is above 15 000 EUR (the source amount converted to EUR; the threshold may differ in your account configuration), the response has `third_party_document_required: true`. Such an order is created as usual, but it is not executed automatically until its invoice or contract is attached: after the deposit is confirmed it stays `new` and waits for Stablegate operations.

Upload the file while the order is still `new`, for example before the customer sends the USDT:

```bash
curl 'https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b/third-party-document/' \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form 'file=@invoice-2025-0142.pdf'
```

The response is the order with `third_party_document_uuid` set. Once the invoice is attached, the order is processed as usual; if the deposit has already arrived, processing resumes. The rules and errors are in [Third-Party Payouts and the Invoice](https://docs.stablegate.com/docs/guide/orders#third-party-payouts-and-the-invoice).

---

## Step 6: Customer Sends USDT

Instruct your customer to send the USDT to the deposit address:

<table>
<thead>
  <tr>
    <th>
      Detail
    </th>
    
    <th>
      Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Token
      </strong>
    </td>
    
    <td>
      USDT (ERC-20)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Network
      </strong>
    </td>
    
    <td>
      Ethereum mainnet
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Recipient Address
      </strong>
    </td>
    
    <td>
      <code>
        0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Amount
      </strong>
    </td>
    
    <td>
      <code>
        500.000000 USDT
      </code>
    </td>
  </tr>
</tbody>
</table>

::warning
- The customer must send USDT on the **Ethereum network** — not on other networks such as Tron or BSC.
- The amount does not have to match to the cent: an under- or overpayment changes the payout, which is recalculated from what actually arrived, and does not fail the order.
- The deposit must be completed before `valid_until`.
::

---

## Step 7: Monitor Order Status

After the customer sends USDT, poll the order status. Ethereum transactions typically confirm within a few minutes.

**Request:**

::code-switcher{method="GET" path="/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b/"}
```bash
curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b/ \
  --header 'X-Api-Key: YOUR_API_KEY'
```
::

**Status transitions you will observe:**

1. **new** — Order created, waiting for USDT deposit. `source.deposit_status` stays `null` until the transaction is seen
2. **new** with `source.deposit_status: "received"` or `"confirmed"` — the transaction is on-chain and is being matched; `source.transaction_hash` carries the deposit hash the customer can check
3. **processing** — deposit credited, exchange in progress
4. **done** — EUR has been sent to the customer's bank account via SEPA

**Response (completed):**

```json
{
  "uuid": "od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
  "reference": "SG-20250115-GHIJKL",
  "state": "done",
  "deposit_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
  "source": {
    "rail": "ethereum",
    "asset": "USDT",
    "amount": "500.000000",
    "deposit_bank_info": null,
    "transaction_hash": "0x9f8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a39281706f5e4d3c2b1a0",
    "deposit_status": "credited"
  },
  "destination": {
    "rail": "sepa",
    "asset": "EUR",
    "amount": "473.25",
    "client_account": "DE89370400440532013000"
  },
  "commission": {
    "asset": "USDT",
    "amount": "10.00"
  },
  "account": {
    "uuid": "ac1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f",
    "code": "TRD-001",
    "name": "Trading Account",
    "type": "trading"
  },
  "error_message": null,
  "created_at": "2025-01-15T10:50:00.000Z",
  "valid_until": null
}
```

::note
Once the status reaches `done`, the SEPA transfer has been initiated. The customer's bank may take an additional 1 business day to credit the funds.
::

---

## Step 8: Order Complete

The order is in the `done` state. **473.25 EUR** has been sent to the customer's IBAN (`DE89370400440532013000`) via SEPA.

**Summary:**

<table>
<thead>
  <tr>
    <th>
      Item
    </th>
    
    <th>
      Value
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Customer sent
      </strong>
    </td>
    
    <td>
      500.00 USDT to <code>
        0x742d...bD18
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Fee
      </strong>
    </td>
    
    <td>
      10.00 EUR
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Customer received
      </strong>
    </td>
    
    <td>
      473.25 EUR at <code>
        DE89...3000
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Status
      </strong>
    </td>
    
    <td>
      <code>
        done
      </code>
    </td>
  </tr>
</tbody>
</table>

---

## Cancelling an Order

If the customer decides not to proceed before sending the USDT deposit, you can cancel the order:

**Request:**

::code-switcher{method="POST" path="/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b/cancel/"}
```bash
curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b/cancel/ \
  --request POST \
  --header 'X-Api-Key: YOUR_API_KEY'
```
::

**Response:** `204 No Content`

After cancellation, verify the order status:

::code-switcher{method="GET" path="/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b/"}
```bash
curl https://api.stablegate.com/v1/customers/c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f/orders/od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b/ \
  --header 'X-Api-Key: YOUR_API_KEY'
```
::

```json
{
  "uuid": "od2f3a4b-5c6d-7e8f-9a0b-1c2d3e4f5a6b",
  "reference": "SG-20250115-GHIJKL",
  "state": "cancelled",
  "error_message": null,
  "created_at": "2025-01-15T10:50:00.000Z",
  "valid_until": null
}
```

::warning
Orders can only be cancelled before the deposit is processed. Once the order reaches `processing` status, cancellation is no longer possible.
::

---

## Error Handling

### Route unavailable

If the route check in Step 2 returns `available: false`, inform the customer that this conversion is temporarily unavailable.

### Limits exceeded

If the check in Step 4 returns a non-empty array, the transaction breaks a limit. Do not look at `excess_amount` alone: the minimum-amount rule reports itself with `excess_amount: "0.00"` and the reason in `error_msg`. Display `available_amount` and suggest a smaller transaction.

### Wrong network or token

If the customer sends tokens on the wrong network (e.g., USDT on Tron instead of Ethereum) or sends a different token, the deposit will not be detected. In this case, contact the Stablegate support team for assistance.

### Order failed

If the order reaches a `failed` or `rejected` state, check `error_message`. A deposit that differs in amount does not fail the order by itself: the payout is recalculated from the amount actually received.

### Order expired

If the customer does not send USDT before `valid_until`, the order may expire. Create a new order if needed.


## Sitemap

See the full [sitemap](https://docs.stablegate.com/sitemap.md) for all pages.
