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

# Off-Ramp Integration

> Integrate the Off-Ramp widget to let users sell crypto on your application.

This example shows you how to integrate the Busha Off-Ramp widget to let users sell cryptocurrency and receive fiat directly in your application.

## Use Cases

* Wallet app letting users cash out crypto
* Marketplace vendor payouts
* P2P trading platform
* Gaming platform withdrawals to local currency

## Basic Integration

### Simple Button Integration

The quickest way to integrate the Off-Ramp widget is with a button that opens the widget in a new window:

```html theme={null}
<button
  onclick="window.open('https://sandbox.sell.busha.io/?publicKey=YOUR_PUBLIC_KEY&side=sell&redirectUrl=https://your-app.com/handle-deposit', '_blank')"
>
  Sell Crypto with Busha
</button>
```

### Iframe Integration

For a more embedded experience, use an iframe:

```html theme={null}
<iframe
  src="https://sandbox.sell.busha.io/?publicKey=YOUR_PUBLIC_KEY&side=sell&redirectUrl=https://your-app.com/handle-deposit"
  width="100%"
  height="700px"
  style="border: 1px solid #e5e7eb; border-radius: 8px;"
  title="Busha Off-Ramp Widget"
></iframe>
```

***

## Pre-filled Integration Examples

> [tab] Nigeria (NGN)
>
> ### Sell 0.005 ETH for NGN
>
> ```html theme={null}
>     <button
>       onclick="window.open('https://sandbox.sell.busha.io/?publicKey=YOUR_PUBLIC_KEY&side=sell&cryptoAsset=ETH&network=ETH&fiatCurrency=NGN&cryptoAmount=0.005&redirectUrl=https://your-app.com/handle-deposit', '_blank')"
>     >
>       Sell ETH for Naira
>     </button>
> ```
>
> ### Sell USDT for NGN Bank Payout
>
> ```html theme={null}
> <button
>   onclick="window.open('https://sandbox.sell.busha.io/?publicKey=YOUR_PUBLIC_KEY&side=sell&cryptoAsset=USDT&network=TRX&fiatCurrency=NGN&cryptoAmount=100&redirectUrl=https://your-app.com/handle-deposit', '_blank')"
> >
>   Cash Out USDT to Bank
> </button>
> ```

> [tab] Kenya (KES)
>
> ### Sell Bitcoin for KES
>
> ```html theme={null}
>     <button
>       onclick="window.open('https://sandbox.sell.busha.io/?publicKey=YOUR_PUBLIC_KEY&side=sell&cryptoAsset=BTC&network=BTC&fiatCurrency=KES&cryptoAmount=0.001&redirectUrl=https://your-app.com/handle-deposit', '_blank')"
>     >
>       Sell Bitcoin for KES
>     </button>
> ```
>
> ### Sell USDT for M-Pesa Payout
>
> ```html theme={null}
> <button
>   onclick="window.open('https://sandbox.sell.busha.io/?publicKey=YOUR_PUBLIC_KEY&side=sell&cryptoAsset=USDT&network=TRX&fiatCurrency=KES&cryptoAmount=50&redirectUrl=https://your-app.com/handle-deposit', '_blank')"
> >
>   Cash Out to M-Pesa
> </button>
> ```

***

## Configuration Parameters

<table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Required
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>publicKey</td>
      <td>Yes</td>
      <td>Your Busha Public API Key</td>
    </tr>

    <tr>
      <td>side</td>
      <td>Yes</td>
      <td>Must be "sell" for off-ramp</td>
    </tr>

    <tr>
      <td>redirectUrl</td>
      <td>Yes</td>

      <td>
        URL to redirect after transaction setup
      </td>
    </tr>

    <tr>
      <td>cryptoAsset</td>
      <td>No</td>

      <td>
        Cryptocurrency to sell (e.g., BTC, ETH, USDT)
      </td>
    </tr>

    <tr>
      <td>network</td>
      <td>No</td>

      <td>
        Blockchain network (e.g., BTC, ETH, POLYGON)
      </td>
    </tr>

    <tr>
      <td>fiatCurrency</td>
      <td>No</td>

      <td>
        Target fiat currency (NGN for Nigeria, KES for Kenya)
      </td>
    </tr>

    <tr>
      <td>cryptoAmount</td>
      <td>No</td>
      <td>Amount of crypto to sell</td>
    </tr>

    <tr>
      <td>fiatAmount</td>
      <td>No</td>

      <td>
        Target fiat amount (ignores cryptoAmount if set)
      </td>
    </tr>
  </tbody>
</table>

***

## React Component Examples

> [tab] Nigeria (NGN)
>
> ```jsx theme={null}
>     import React from "react";
>
>     function SellEthereumButton() {
>       const openOffRamp = () => {
>         const params = new URLSearchParams({
>           publicKey: "YOUR_PUBLIC_KEY",
>           side: "sell",
>           cryptoAsset: "ETH",
>           network: "ETH",
>           fiatCurrency: "NGN",
>           cryptoAmount: "0.005",
>           redirectUrl: "https://your-app.com/handle-deposit",
>         });
>
>         window.open(
>           `https://sandbox.sell.busha.io/?${params.toString()}`,
>           "_blank"
>         );
>       };
>
>       return <button onClick={openOffRamp}>Sell Ethereum for Naira</button>;
>     }
>
>     export default SellEthereumButton;
>
> ```

> [tab] Kenya (KES)
>
> ```jsx theme={null}
>     import React from "react";
>
>     function SellBitcoinButton() {
>       const openOffRamp = () => {
>         const params = new URLSearchParams({
>           publicKey: "YOUR_PUBLIC_KEY",
>           side: "sell",
>           cryptoAsset: "BTC",
>           network: "BTC",
>           fiatCurrency: "KES",
>           cryptoAmount: "0.001",
>           redirectUrl: "https://your-app.com/handle-deposit",
>         });
>
>         window.open(
>           `https://sandbox.sell.busha.io/?${params.toString()}`,
>           "_blank"
>         );
>       };
>
>       return <button onClick={openOffRamp}>Sell Bitcoin for KES</button>;
>     }
>
>     export default SellBitcoinButton;
> ```

***

## Complete Integration Flow

**1. User Initiates Sell**

User clicks "Sell Crypto" button in your app

**2. Redirect to Off-Ramp Widget**

Your app opens the Busha Off-Ramp widget with pre-filled parameters

**3. User Configures Payout**

User logs in to Busha, completes KYC if needed, and selects their payout
method: - **Nigeria**: Bank account - **Kenya**: M-Pesa or bank account

**4. Redirect Back with Deposit Instructions**

Busha redirects user back to your app with deposit address and amount

**5. User Confirms and Sends Crypto**

Your app displays the deposit instructions. User confirms and sends crypto
to the provided address

**6. Busha Processes Payout**

Once crypto is received, Busha processes the payout to the user's selected
method

## Learn More

* [Off-Ramp Widget Overview](https://docs.busha.io/overview/off-ramp-widget.md) - Understand how the widget works
* [Integration Guide](https://docs.busha.io/guides/widgets/integrate-off-ramp.md) - Detailed integration steps
* [Supported Currencies](https://docs.busha.io/guides/reference/supported-currencies.md) - See all supported assets
* [Webhooks Setup](https://docs.busha.io/guides/webhooks/setup.md) - Monitor transactions in real-time
* [Test Addresses](https://docs.busha.io/guides/reference/test-addresses.md) - Get test crypto addresses for sandbox testing


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.