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.
Generating One-Click-Sell URLs
One-Click-Sell URLs must have following query parameters set in the URL:defaultAssetpresetFiatAmountorpresetCryptoAmount
Query parameters
| Parameter | Reqd | Type | Description |
|---|---|---|---|
sessionToken | Yes | String | Token generated by the Session Token API. |
partnerUserRef | Yes | String | Unique ID representing the end-user. Must be less than 50 chars. Use with the Offramp Transaction Status API 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 and use Offramp Transaction Status API to fetch the send to_address details. |
defaultAsset | Yes | String | Symbol of the crypto asset to sell (e.g., ETH, BTC, USDC). Received from Offramp Options and sent to Sell Quote. |
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. |