Configure the Swap user journey

The following parameters can be used to customize the Swap user journey in the widget.

apiKey requiredYour publishable API key. This is used to assign customers and transactions to your MoonPay account.
baseCurrencyCodeThe code of the source cryptocurrency (e.g. usdc, btc) you want the customer to swap.

Refer to our Currencies API to get a full list of supported currencies.
baseCurrencyAmountA positive integer representing how much of the source cryptocurrency the customer wants to swap. Best used together with the baseCurrencyCode & quoteCurrencyCode parameters.

Refer to our Currencies API to get the minimum and maximum values for each currency.
quoteCurrencyCodeThe code of the destination cryptocurrency (e.g. eth, matic) you want the customer to swap to. The customer will not be able to select another currency. To differentiate between networks, use the currency codes listed in the MoonPay Dashboard.
quoteCurrencyAmountA positive integer representing how much of the destination crypto the customer wants to receive. Best used together with the quoteCurrencyCode & baseCurrencyCode parameters.

Refer to our Currencies API to get the minimum and maximum values for each currency.

Note that if you pass both baseCurrencyAmount and quoteCurrencyAmount, the quote currency amount will take precedence.
walletAddressThe cryptocurrency wallet address the swapped funds will be sent to. If you pass a valid wallet address the customer won't be prompted to enter one.

When pre-filling wallet addresses, you must pass quoteCurrencyCode and sign the URL. Values need to be URL encoded in order to generate a valid signature.
walletAddressTagThe secondary cryptocurrency wallet address identifier/memo for coins such as EOS, XLM, XRP and XMR. This parameter will be skipped if walletAddress or quoteCurrencyCode is not passed.
externalCustomerIdAn identifier you would like to associate with the customer. This identifier will be present whenever we pass you customer data, allowing you to match our data with your own existing customer data.
colorCodeThe color code for the widget main color. It is used for buttons, links and highlighted text. Only hexadecimal codes are accepted, for example #FF2B8F. You can also apply a different color for dark mode by adding a comma separated color code.
themeEnable dark mode or light mode as the default appearance for the widget. Possible values are dark, light.
themeIdID of the theme created for your application or website. See Themes page.
languageThe ISO 639-1 standard language code representing the language the widget should use.

If you pass a code for a language we do not support, the widget will remain in the current default language. This is usually the language of the customer's browser; if we do not offer that language, the widget will use English (en).