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

# One-click-sell Offramp URL

Prefill all query string parameters in the Offramp URL and take users straight to the order preview screen!

<Warning>
  **Security Requirements must be enforced**: Your backend API that generates session tokens must implement proper security measures. See [Security Requirements](/onramp/security-requirements) for complete implementation guidance.
</Warning>

<Info>
  Should my App use One-click-sell?

  If your users have already selected the asset they want to sell, an amount, and/or a cashout method in your App, **yes**.
  If you want to preset these values for your users, **yes**.
</Info>

<Tip>
  Get a ready-to-use One-Click-Sell URL directly from the [Sell Quote API](/onramp/offramp/generating-quotes#example-requestresponse-with-offramp-url) by including `source_address`, `redirect_url`, and `partner_user_ref` parameters in your quote request!
</Tip>

### Generating One-Click-Sell URLs

One-Click-Sell URLs must have following query parameters set in the URL:

* `defaultAsset`
* `presetFiatAmount` or `presetCryptoAmount`

Then it initializes Coinbase Offramp with the appropriate parameters to execute that sell.

For example:

```bash theme={null}
https://pay.coinbase.com/v3/sell/input?sessionToken=<token>&partnerUserRef=testUser&redirectUrl=https://www.coinbase.com/onramp-redirect&defaultAsset=ETH&presetFiatAmount=100&quoteId=ae77980c-f656-4c69-b380-cb5cf99276a9
```

Crypto amount only:

```bash theme={null}
https://pay.coinbase.com/v3/sell/input?sessionToken=<token>&partnerUserRef=testUser&redirectUrl=https://www.coinbase.com/onramp-redirect&defaultAsset=BTC&presetCryptoAmount=0.001&quoteId=ae77980c-f656-4c69-b380-cb5cf99276a9
```

### Query parameters

| Parameter            | Reqd | Type    | Description                                                                                                                                                                                                                                                                                                                                     |
| :------------------- | :--- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sessionToken`       | Yes  | String  | Token generated by the [Session Token API](/onramp/offramp/generating-offramp-url#getting-a-session-token).                                                                                                                                                                                                                                     |
| `partnerUserRef`     | Yes  | String  | Unique ID representing the end-user. Must be less than 50 chars. Use with the [Offramp Transaction Status API](/onramp/offramp/transaction-status#offramp-transaction-status) to retrieve transactions made during the session.                                                                                                                 |
| `redirectUrl`        | Yes  | String  | URL to redirect the user after they complete the offramp transaction. Add your redirectUrl in [your onramp app domain allowlist on CDP portal](https://portal.cdp.coinbase.com/products/onramp) and use [Offramp Transaction Status API](/onramp/offramp/transaction-status#offramp-transaction-status) to fetch the send `to_address` details. |
| `defaultAsset`       | Yes  | String  | Symbol of the crypto asset to sell (e.g., `ETH`, `BTC`, `USDC`). <br /><br />*Received from [Offramp Options](/onramp/offramp/configurations) and sent to [Sell Quote](/onramp/offramp/generating-quotes).*                                                                                                                                     |
| `presetFiatAmount`   | Yes  | Number  | Amount in fiat to receive from the crypto sale. Do not add presetFiatAmount if presetCryptoAmount is present.                                                                                                                                                                                                                                   |
| `presetCryptoAmount` | Yes  | Number  | Use this instead of `presetFiatAmount` to specify the exact crypto amount to sell. Do not add presetCryptoAmount if presetFiatAmount is present                                                                                                                                                                                                 |
| `disableEdit`        | No   | Boolean | If set to `true`, prevents users from editing their order in the One-Click Sell flow. Defaults to `false`.                                                                                                                                                                                                                                      |
