Trade Widget

The Trade Widget is a ready-made trading UI hosted by Coinify, embedded into your web page via an iframe. It handles the complete end-user experience — onboarding, KYC, quotes, payment, and trade history — with no trading UI to build on your side.

Basic setup

Add an iframe element to your page pointing to the Trade Widget URL, with your partnerId as a required query parameter:

<!-- Sandbox -->
<iframe
  src="https://trade-ui.sandbox.coinify.com?partnerId={your-partner-id}"
  width="100%"
  height="576px"
  allow="camera;fullscreen;accelerometer;gyroscope;magnetometer;payment"
  allowfullscreen>
</iframe>

<!-- Production -->
<iframe
  src="https://trade-ui.coinify.com?partnerId={your-partner-id}"
  width="100%"
  height="576px"
  allow="camera;fullscreen;accelerometer;gyroscope;magnetometer;payment"
  allowfullscreen>
</iframe>
📘

The allow and allowfullscreen attributes are required. They enable camera access for KYC identity verification and Apple Pay support. If you are nesting the widget inside another iframe, these attributes must be added to every iframe in the chain.


Widget dimensions

The widget is responsive and adjusts its layout to the available width:

LayoutMin widthMax width
Mobile320px575px
Tablet576px768px
Desktop769px/

The minimum recommended height is 576px. Increasing the height stretches the widget and hides scrollbars on text-heavy pages like Trade Details. There is no maximum width, but a minimum of 320px is required — on the smallest mobile screens, avoid adding horizontal margin or padding around the widget.


Query parameters

Configure the widget's behaviour and appearance by appending query parameters to the URL.

Every query parameter must be URL-encoded, e.g. using encodeURIComponent() in JavaScript.

Partner configuration

ParameterDescription
partnerIdRequired. Your Partner ID as assigned by Coinify.
partnerNameName displayed in the widget (e.g. next to a partner fee). Defaults to 'Partner'.
partnerContextFree-form context passed back to you in webhook payloads. Accepts a string or stringified JSON.

Look & feel

ParameterDescription
primaryColorColour of the primary button. Accepts a named value (e.g. blue), hex (e.g. #00ff00), or rgba.
themeModeWidget theme — light or dark. Defaults to light.

Currencies

ParameterDescription
cryptoCurrenciesComma-separated list of cryptocurrencies to offer (e.g. BTC,ETH,XLM). Limits to a subset of Coinify-supported currencies.
fiatCurrenciesComma-separated list of fiat currencies to offer.
defaultCryptoCurrencyThe cryptocurrency pre-selected on the quote screen when multiple are available.
defaultFiatCurrencyThe fiat currency pre-selected on the quote screen when multiple are available.

Trade amounts

ParameterDescription
buyAmountPre-fills the amount on the Buy quote screen.
sellAmountPre-fills the amount on the Sell quote screen.
isBuyAmountFixedSet to true to lock the buyAmount so the end-user cannot change it.
isSellAmountFixedSet to true to lock the sellAmount so the end-user cannot change it.
isBuyAmountWithFeesSet to true so that buyAmount is treated as fees-included — the amount the end-user will spend in total.
isSellAmountWithFeesSet to true so that sellAmount is treated as fees-included.

Wallet address

ParameterDescription
addressPre-fills the receiving wallet address (Buy) or refund address (Sell). See How to use address below.
addressSignatureHMAC-SHA-256 signature for the address value. Required if you have established a shared secret with Coinify.
walletTypeWallet type — self_hosted (user's own wallet) or vasp (hosted by a third-party exchange). If not provided, the end-user is prompted to select.
vaspIdRequired when walletType is vasp. If provided, the VASP selection screen is skipped. See Supported VASPs →.
memoOptional memo or destination tag for cryptocurrencies that support it.

Navigation & access

ParameterDescription
targetPageLanding page when the widget loads. Values: login, signup, signup-corporate, buy, sell, trade-history.
refreshTokenPasses an authenticated session into the widget — used for Frictionless Sign-in. Must be URL-encoded.
noSignupControls sign-up availability. true disables sign-up entirely; corporate allows only individual sign-up; individual allows only corporate sign-up; false allows both.
confirmMessagesWhen set, the widget waits for external confirmation before proceeding after key trade events. See Sending/Receiving Widget Messages →.

Payment methods

ParameterDescription
transferInMediaComma-separated list of accepted inbound payment methods. Available: card, bank, applepay, googlepay, blockchain.
transferOutMediaComma-separated list of accepted outbound payment methods. Available: bank, blockchain.

Return URL

ParameterDescription
returnURLURL to redirect the end-user to after a successfully completed trade. Must be URL-encoded. Only available on the Customised Landing Page.

Improve UX by skipping screens

Passing certain parameters removes steps the end-user would otherwise have to complete manually. If you already hold any of this data, pass it through to streamline the flow:

Parameter(s)Screen skipped
transferInMediaPayment method selection screen
buyAmount + defaultFiatCurrency + defaultCryptoCurrencyQuote screen
addressWallet address entry screen
walletTypeWallet type selection screen
vaspIdVASP selection screen (when walletType is vasp)

Enabling Buy, Sell, or both

By default the widget enables both Buy and Sell with all available payment methods. Use transferInMedia and transferOutMedia to restrict this:

Use caseParameters
Buy only (card or bank), Sell disabledtransferInMedia=card,bank
Buy only (all methods), Sell disabledtransferOutMedia=blockchain
Buy via bank transfer onlytransferInMedia=bank
Sell only (all methods), Buy disabledtransferInMedia=blockchain

How to use address

For a single cryptocurrency, pass the address directly:

<iframe src="...?cryptoCurrencies=BTC&address=2N7gzbQsDnfAFdwabcFqyw1Q8y1ZUpeqUgD&..." />

For multiple cryptocurrencies, use the currency:address format:

<iframe src="...?address=BTC:2N7gzbQsDnfAFdwabcFqyw1Q8y1ZUpeqUgD,ETH:0x44eae1E05F5f294f0f2a054D16605993FCd627a9&..." />

The same format applies to addressSignature and memo.

Securing the address with a signature

If you pre-fill wallet addresses, it is strongly recommended to sign them using a shared secret to prevent tampering. Share a UUID-format secret with Coinify via a secure channel to enable this feature — once enabled, trades with unsigned or incorrectly signed addresses will be rejected.

Generate the signature using HMAC-SHA-256:

const crypto = require('crypto');

const address = 'your-crypto-address';
const secret = 'your-shared-secret';

const addressSignature = crypto.createHmac('SHA256', secret).update(address).digest('hex');

Then pass both address and addressSignature as query parameters.

addressSignature is an opt-in feature and requires a shared secret to be established with Coinify first.


Customised Landing Page

Coinify can provision a dedicated landing page URL for your Trade Widget with custom branding — your logo, brand colours, browser tab title, and page URL path. To set this up, contact Coinify through your dedicated communication channel and provide

  • Partner Title — browser tab title (e.g. Crypto Company)
  • Partner Name — defines the URL path (e.g. https://trade.coinify.com/YourCompanyName)
  • Primary Colour — button colour (e.g. #4231c8)
  • Light & Dark Colour — gradient background colours behind the widget
  • Logo — an .svg file of your logo
  • Website URL — linked behind your logo on the landing page

The returnURL query parameter is exclusively available on the Customised Landing Page, allowing you to redirect users back to your product after a completed trade.


Next steps

  • Frictionless Sign-up Flow → — silently onboard your users without a Coinify sign-up screen
  • Frictionless Sign-in → — pass an authenticated session into the widget via refreshToken
  • Enable Apple Pay → — additional setup steps required for Apple Pay
  • Trade Widget SDK → — prefer a JavaScript-based integration over a raw iframe