---
api: 'Crypto Ramp API'
---

# Retrieve a sell redirect URL

Use this endpoint for the sell (off-ramp) flow.
Retrieve a redirect URL to the Ramp app widget for the provided sell parameters. Use it to redirect the customer to Revolut Ramp to sell crypto for fiat.

:::note
The `amount` in the Redirect URL is provided in the crypto currency's minor units, i.e. its smallest unit given its decimal precision (for example, satoshis for BTC, wei for ETH).
For example, 0.064 ETH (18 decimals) is represented as `64000000000000000`, and 0.05 BTC (8 decimals) is represented as `5000000`.
:::

After the customer completes the sell, track the order status using [Webhooks](https://developer.revolut.com/docs/api/crypto-ramp#tag-webhooks) or by calling [`/sell-orders/{order_id}`](https://developer.revolut.com/docs/api/crypto-ramp#retrieve-a-sell-order).

## Endpoint

GET `/sell`

## Parameters

### header parameters

- `X-API-KEY` (any, optional)
  Your API key that you received during integration setup. 
  For more information, see the **Authorization** section.

### query parameters

- `fiat` (string, required)
  The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the fiat currency that the customer wants to receive.

- `amount` (number, required)
  The crypto amount that the customer wants to sell.

- `crypto` (string, required)
  The ID of the crypto token to sell, obtained from the [`/sell-config`](https://developer.revolut.com/docs/api/crypto-ramp#retrieve-sell-configuration) endpoint.

- `payment` (enum, required)
  The payout method used to receive the fiat proceeds.
  Possible enum values:

  - `revolut`

- `region` (string, required)
  The [ISO 3166 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country of residence of the customer selling the crypto.

- `wallet` (string, optional)
  The address of the crypto wallet from which the customer sends the crypto.

- `orderId` (string, optional)
  Your external identifier for the sell order.
  Should be either UUID or ULID.
  
  Although optional for creating the sell session, `orderId` is required to receive sell order webhook events and to retrieve the order with `/sell-orders/{order_id}`. If omitted, no sell order webhook events are sent.

- `partnerRedirectUrl` (string, optional)
  The URL to which to redirect the customer after the sale—for example, your website. If not provided, the customer is shown the transaction result in Revolut Ramp.

## Returns

### 200

The requested redirect URL

:::note
The `amount` in the Redirect URL is provided in the crypto currency's minor units, i.e. its smallest unit given its decimal precision (for example, satoshis for BTC, wei for ETH).
For example, 0.064 ETH (18 decimals) is represented as `64000000000000000`, and 0.05 BTC (8 decimals) is represented as `5000000`.

The returned URL contains an opaque, time-limited token. Use the URL exactly as returned and redirect the customer promptly.
:::

#### Response attributes

- `ramp_redirect_url` (string)
    The URL to Revolut Ramp to which to redirect the customer for the crypto purchase or sale.

## Error responses

| HTTP status code | Description |
| --- | --- |
| 400 | Bad request  A request parameter is invalid. |
| 401 | Unauthorized |
| 429 | Too Many Requests |
| 500 | Server error  An unexpected error occurred. |
| 503 | The endpoint is disabled by Kill Switch |
