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

# Off-Ramp integration

> Step-by-step walkthrough to convert crypto into fiat with the Ramps API, using either a single off-ramp order or a reusable off-ramp session.

Off-Ramp lets your users sell crypto and receive fiat in a bank account. There are **two ways** to run an off-ramp, and you can use either (or both) depending on your product. For request and response details, follow the endpoint link in each step.

<Note>
  Available payout methods depend on the country. See [Countries & payment methods](/ramps-api/overview/countries/overview) first. In Colombia, Request-to-Pay (R2P) is **On-Ramp only** and cannot be used for payouts.
</Note>

## Two ways to run an off-ramp

|                            | Off-Ramp order                                       | Off-Ramp session                                                                                           |
| -------------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **What it is**             | A single withdrawal tied to one quote (locked rate). | A reusable setup tied to the customer's destination account.                                               |
| **How orders are created** | You create the order explicitly.                     | Orders are created **automatically** each time the customer sends crypto to the session's deposit address. |
| **Rate**                   | The quote you pass.                                  | A fresh quote is generated automatically for each deposit.                                                 |
| **Best for**               | One-off withdrawals.                                 | Recurring withdrawals to the same account without recreating an order each time.                           |

Both share the same setup (customer, KYC, and a validated payout account).

## Common setup

<Steps>
  <Step title="Authenticate">
    Get an access token with the OAuth2 Client Credentials flow and send it as a `Bearer` token on every call.

    → [Acquire Access Token](/ramps-api/authentication/acquire-access-token)
  </Step>

  <Step title="Create the customer">
    Register the end user and keep the returned `customerId`.

    → [Create Customer](/ramps-api/customers/create-customer)
  </Step>

  <Step title="Accept Terms & Conditions">
    Right after creating the customer, register their acceptance of the active Terms & Conditions. This is a required step before the customer can operate.

    → [Terms & Conditions](/ramps-api/terms-and-conditions/introduction) · [Accept Terms](/ramps-api/customers/accept-terms)
  </Step>

  <Step title="Verify identity (KYC)">
    The customer must reach KYC status `COMPLETED` before operating.

    → [Identity verification (KYC)](/ramps-api/kyc/overview)
  </Step>

  <Step title="Register and confirm the payout account">
    Register the user's destination bank account (their **external fiat account**) — for example a CBU/CVU/alias in Argentina, a CLABE in Mexico, or a PSE/BRE-B account in Colombia. First fetch the required fields, then create the account and confirm it.

    Validation may be **synchronous** (usable right away) or **asynchronous** (it starts in `PROCESSING` and becomes usable once validation returns). It must be `ENABLED` before it can receive a payout. Keep its `fiatAccountId` — both flows need it.

    → [Retrieve Fiat Account Requirements](/ramps-api/fiat-accounts/retrieve-fiat-account-requirements) · [Create Fiat Account](/ramps-api/fiat-accounts/create-fiat-account) · [Confirm Fiat Account](/ramps-api/fiat-accounts/confirm-fiat-account)
  </Step>
</Steps>

## Option 1 — Single off-ramp order

<Steps>
  <Step title="Create a quote">
    Request an off-ramp quote (crypto → fiat). The quote holds a price for a limited time and returns a `quoteId`.

    → [Create Quote](/ramps-api/quotes/create-quote)
  </Step>

  <Step title="Create the off-ramp order">
    Create the order with the `quoteId`, the `customerId`, the destination `fiatAccountId` and a partner `externalRef`. The response includes the **crypto deposit address** the customer must send funds to.

    → [Create Off-Ramp Order](/ramps-api/off-ramp/create-off-ramp-order)
  </Step>

  <Step title="User sends crypto and the order completes">
    The customer sends the crypto to the returned deposit address. Once the deposit is confirmed, the trade executes and Ripio pays out the fiat to the registered account — the order moves to `COMPLETED`.

    Track it with [Off-Ramp Events](/ramps-api/webhooks/off-ramp-events) (recommended) or by polling [List Off-Ramp Orders](/ramps-api/off-ramp/list-off-ramp-orders).
  </Step>
</Steps>

## Option 2 — Off-ramp session

<Steps>
  <Step title="Create the off-ramp session">
    Create a session with the destination `fiatAccountId`. The response includes the **crypto deposit addresses** (one per supported network). The session is reusable and does not expire.

    → [Create Off-Ramp Session](/ramps-api/off-ramp/create-off-ramp-session)
  </Step>

  <Step title="User sends crypto — orders are created automatically">
    Each time the customer sends crypto to a session deposit address, an off-ramp order is created automatically, a fresh quote is applied, the trade executes and the fiat is paid out. No per-deposit API call is needed.

    Track each order with [Off-Ramp Events](/ramps-api/webhooks/off-ramp-events) or by inspecting the session's transactions via [Retrieve an Off-Ramp Session](/ramps-api/off-ramp/retrieve-an-off-ramp-session).
  </Step>
</Steps>

## Order lifecycle

| Status       | Meaning                                                                                                    |
| ------------ | ---------------------------------------------------------------------------------------------------------- |
| `PENDING`    | Order created, waiting for the crypto deposit.                                                             |
| `PROCESSING` | Deposit detected, trade and payout in progress.                                                            |
| `COMPLETED`  | Fiat paid out to the destination account.                                                                  |
| `CANCELLED`  | Something went wrong with the order and it needs review. It can be resolved through customer support (CX). |
| `REFUNDED`   | The amount was refunded to the customer.                                                                   |

## Payout account states

| State         | Meaning                                                |
| ------------- | ------------------------------------------------------ |
| `PROCESSING`  | Validation/registration in progress (async providers). |
| `UNCONFIRMED` | Validated, waiting for confirmation.                   |
| `ENABLED`     | Confirmed and ready to receive payouts.                |
| `DISABLED`    | Validation failed permanently.                         |
