Configure the Off-Ramp user journey
The following parameters can be used to customize the user journey in the widget.
Parameter | Description |
---|---|
apiKey required | Your publishable API key. This is used to assign customers and transactions to your MoonPay account. |
baseCurrencyCode | The 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. |
defaultBaseCurrencyCode | The 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. |
refundWalletAddress | The 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. |
refundWalletAddresses | A 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. |
colorCode | The 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. |
theme | Enable dark mode or light mode as the default appearance for the widget. Possible values: dark, light. |
themeId | ID of the theme created for your application or website. See Themes page. |
language | The 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). |
quoteCurrencyCode | The code of the fiat currency you want the customer to be paid in. Possible values: usd, eur, gbp. |
baseCurrencyAmount | A 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. |
quoteCurrencyAmount | A positive integer representing the fiat equivalent of crypto the customer wants to sell. 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 base currency amount will take precedence. |
lockAmount | Set 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. |
email | The customer's email address. If you pass a valid email address, the customer won't be prompted to enter one. |
externalTransactionId | An identifier you would like to associate with the transaction. This identifier will be present whenever we pass you transaction data. |
externalCustomerId | An 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. |
paymentMethod | Pre-select the payout method you want the customer to use. Possible values are credit_debit_card, ach_bank_transfer,gbp_bank_transfer, gbp_open_banking_payment, sepa_bank_transfer, sepa_open_banking_payment, pix_instant_payment and paypal. If payout method is unavailable users will default to our payout selection screen. |
redirectURL | A 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, and respective tag, if applicable, as query parameters to your URL. NB: If the deposit wallet address tag is included in the parameters, you must include this with the deposit otherwise the 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. |
showAllCurrencies | Set 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. |
showWalletAddressForm | Set 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. |
unsupportedRegionRedirectUrl | A 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. |
skipUnsupportedRegionScreen | Set 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 . |
Updated about 2 months ago