Fiat Onramp
Initialise the widget
For ease of use, we have a helper which assists you in integrating the Wert Widget into your web app. You can use our SDK to initialise the payment module or, for react projects, you can use this wrapper.
You can find some examples for the integrations on Github.
You'll then need to import the Wert Widget:
import WertWidget from '@wert-io/widget-initializer';
And create a configuration object:
const wertWidget = new WertWidget(options);
The options you can pass to the widget are:
Property | Required | Description | Data Type | Default value | Possible values |
---|---|---|---|---|---|
partner_id | Yes | Provided when you register as a partner. | string | ||
origin | In sandbox | Initialises the module in the sandbox/production environment. | string | https://widget.wert.io | https://sandbox.wert.io |
skip_init_navigation | No | When true, opens the widget in the purchase details screen. | boolean | false | true, false |
click_id | Yes | Unique identifier for the order which helps you track it and us troubleshoot issues. | function | uuid_v4() | |
theme | No | Module will use theme colors as a basis. | string | ||
currency | No | Default fiat currency which will be selected when the module opens. | string | USD | USD |
currency_amount | No | Default amount in fiat currency which will be pre-filled in the module. Minimum value is $5. | numeric | ||
commodity | No | Default crypto asset that will be selected in the module. | string | BTC | See Supported coins and blockchains |
network | No | Network for the default crypto asset. | string | bitcoin | See Supported coins and blockchains |
commodities | No | Crypto assets that will be available in the module, as a stringified JSON of an array of objects with commodity and network fields. | string | By default, all assets will be displayed. | See Supported coins and blockchains |
commodity_amount | No | Default crypto amount that will be pre-filled in the module. This option is ignored if currency_amount is set. | numeric | ||
address | No | User's wallet address. Address is checked for validity based on the chosen crypto commodity. If address is invalid, this option is ignored. BTC address format is used as default. | string | BTC | |
phone | No | User's phone number in international format (E. 164 standard). The ‘+’is optional. | string | +11014321111 | |
redirect_url | No | URL where user will be redirected from KYC emails to proceed with the payment. | URL string (with protocol) | https://origin.us/item_id | |
No | User's email address. | string | [email protected] | ||
listeners | No | Use this if you want to listen to some events in the module and react to them. | object | See Listeners object | |
color_background color_buttons color_buttons_text color_secondary_buttons color_secondary_buttons_text color_main_text color_secondary_text color_icons color_links color_success color_warning color_error | No | Color customisation of specific elements of Wert module. Go to the module tuner on the partner dashboard to see how each property affects the widget. | string | Hexadecimal color codes such as #FF0000 | |
buttons_border_radius secondary_buttons_border_radius | No | Custom radius of elements (in pixels) | numeric | 4 | |
extra | No | Extra object allows providing multiple wallets into the widget | object | See Extra object | |
lang | No | Language of the widget | string | en | en - for English fr - for French |
fullname | No | The user's first and last name | string | min 3, max 69 letters; RegExp(/(\w+\s)\w+/) | |
date_of_birth | No | User's date of birth | string | DD/MM/YYYY; MM/DD/YYYY (USA) | |
country_of_residence | No | User's country of residence | string | alpha2 code of the country | |
state_of_residence | No | User's state of residence (for USA) | string | alpha2 code of USA state |
Updated 13 days ago
Documentation related to this page