Off-ramp parameters

πŸ”§ Off-ramp widget configuration

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

ParameterDescription
apiKey requiredYour publishable API key. This is used to assign customers and transactions to your MoonPay account.
baseCurrencyCodeThe code of the cryptocurrency you want the customer to sell. If you pass a baseCurrencyCode, the currency will be selected by default and the customer won't be able to select another currency.
defaultBaseCurrencyCodeThe code of the cryptocurrency you would prefer the customer to sell. If you pass a defaultBaseCurrencyCode, the currency will be selected by default, but the customer will still be able to select another currency.

If both baseCurrencyCode and defaultBaseCurrencyCode are passed, baseCurrencyCode will take precedence.
refundWalletAddressThe cryptocurrency wallet address the funds will be sent to in case we have to issue a refund. If you pass a valid wallet address, the customer won't be prompted to enter one. This parameter will be skipped if baseCurrencyCode is not passed.

It is mandatory to sign URLs when using this parameter. Learn about signing URLs.
refundWalletAddressesA JSON string representing the wallet addresses you want to use for various cryptocurrencies in case we have to issue a refund. An example with BTC and BCH wallet addresses:
{"btc": "tb1qst9rvjnhym6kwmdkwgfs4h5dtp7cau5346jp9x", "bch": "bchtest:qraax8trdwct02968swqf4mpq3y5msqp8y7tmalm77"}

If the customer selects a cryptocurrency for which you have passed a valid wallet address, the customer won't be prompted to enter one.
If you use the refundWalletAddresses parameter, only the cryptocurrencies for which you pass a wallet address will be shown to the customer, unless you also pass the showAllCurrencies parameter.
If both refundWalletAddresses and refundWalletAddresses are passed, refundWalletAddresses takes precedence.

When using this parameter, you must sign URLs. Learn about signing URLs.
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: 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).
quoteCurrencyCodeThe code of the fiat currency you want the customer to be paid in. Possible values: eur, gbp.
baseCurrencyAmountA positive number representing how much crypto the customer wants to sell. Refer to our Currencies API to get the minimum and maximum values for each currency.

If you pass a valid amount, the customer will go directly to the next steps of the widget (wallet address, login or bank details form). This parameter will be skipped if baseCurrencyCode is not passed.
lockAmountSet this parameter to true to lock the baseCurrencyAmount set for the customer and prevent them from modifying it. This parameter will be skipped if baseCurrencyAmount is not passed.
emailThe customer's email address. If you pass a valid email address, the customer won't be prompted to enter one.
externalTransactionIdAn identifier you would like to associate with the transaction. This identifier will be present whenever we pass you transaction data.
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.
paymentMethodPre-select the payment method you want the customer to use. Possible values are:
ach_bank_transfer
credit_debit_card
gbp_bank_transfer
sepa_bank_transfer

If the payment method is unavailable users will default to our payment selection screen.
redirectURLA URL you'd like to redirect the customer to after they complete the sell flow in the widget.

We will append the transaction ID, base currency code, base currency amount, deposit wallet address and respective tag, if applicable, as query parameters to your URL. NB: When the wallet address tag is included in the deposit instructions, you must include it with the deposit, otherwise the customer's transaction will fail.

For example, if you submit the URL www.app.com, we will redirect the customer to www.app.com/?transactionId={{id}}&baseCurrencyCode={{code}} &baseCurrencyAmount={{amount}}&depositWalletAddress={{address}}&depositWalletAddressTag={{tag}}.

You may also pass deeplinks and your own custom parameters.
showAllCurrenciesSet this parameter true if you always want to show all the cryptocurrencies enabled on your account, including those for which you did not pass any wallet address via the refundWalletAddresses parameter. You don't need to set this if you did not use the refundWalletAddresses parameter.
showWalletAddressFormSet this parameter true if you always want to show the wallet address form, even though you've already passed a valid wallet address via the refundWalletAddress or refundWalletAddresses parameters. The customer will be able to see the valid wallet address, but will not be able to change it.
unsupportedRegionRedirectUrlA URL you'd like to redirect the customer upon coming from unsupported region. After the user lands on an unsupported region screen, they will be redirected to provided URL after 3 seconds.
skipUnsupportedRegionScreenSet this parameter true if you want to skip the widget's unsupported region screen and immediately redirect the customer. If you set this parameter, you also need to set unsupportedRegionRedirectUrl.