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:

PropertyRequiredDescriptionData TypeDefault valuePossible values
partner_idYesProvided when you register as a partner.string
originIn sandboxInitialises the module in the sandbox/production environment.stringhttps://widget.wert.io
skip_init_navigationNoWhen true, opens the widget in the purchase details screen.booleanfalsetrue, false
click_idYesUnique identifier for the order which helps you track it and us troubleshoot issues.functionuuid_v4()
themeNoModule will use theme colors as a basis.string
currencyNoDefault fiat currency which will be selected when the module opens.stringUSDUSD
currency_amountNoDefault amount in fiat currency which will be pre-filled in the module.
Minimum value is $5.
commodityNoDefault crypto asset that will be selected in the module.stringBTCSee Supported coins and blockchains
networkNoNetwork for the default crypto asset.stringbitcoinSee Supported coins and blockchains
commoditiesNoCrypto assets that will be available in the module, as a stringified JSON of an array of objects with commodity and network fields.stringBy default, all assets will be displayed.See Supported coins and blockchains
commodity_amountNoDefault crypto amount that will be pre-filled in the module. This option is ignored if currency_amount is set.numeric
addressNoUser'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.
phoneNoUser's phone number in international format (E. 164 standard). The ‘+’is optional.string+11014321111
redirect_urlNoURL where user will be redirected from KYC emails to proceed with the payment.URL string (with protocol)
emailNoUser's email address.string[email protected]
listenersNoUse this if you want to listen to some events in the module and react to them.objectSee Listeners object
NoColor customisation of specific elements of Wert module.
Go to the module tuner on the partner dashboard to see how each property affects the widget.
stringHexadecimal color codes such as #FF0000
NoCustom radius of elements (in pixels)numeric4
extraNoExtra object allows providing multiple wallets into the widgetobjectSee Extra object
langNoLanguage of the widgetstringenen - for English
fr - for French
fullnameNoThe user's first and last namestringmin 3, max 69 letters; RegExp(/(\w+\s)\w+/)
date_of_birthNoUser's date of birthstringDD/MM/YYYY;
country_of_residenceNoUser's country of residencestringalpha2 code of the country
state_of_residenceNoUser's state of residence (for USA)stringalpha2 code of USA state