NFT Checkout
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.
Did you know?
Our NFT checkout can also be used for smart contract interactions such as token purchases, just omit the
extra
object. Check out our example 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 |
extra | If you want to show the NFT image and info in the module | Extra object used to pass NFT’s name and image, author’s avatar, author’s name and seller’s name to the payment module using a window.postMessage method. | object | See Extra object | |
click_id | Yes | Unique identifier for the order which helps you track it and us troubleshoot issues. | function | uuid_v4() | |
signature | Yes | Digital signature used to encrypt the request to ensure it has been sent by you. The private key stored on your backend signs the request and the public key saved in our system decrypts it. | String | See Generate signed data | |
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 |
phone | No | User's phone number in international format (E. 164 standard). The ‘+’is optional. | string | +11014321111 | |
No | User's email address. | string | [email protected] | ||
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 | |
listeners | No | Use this if you want to listen to some events in the module and react to them. | object | See Listeners object structure | |
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 | |
lang | No | Language of the widget | string | en | en - for English fr - for French |
isCryptoHidden | Optional | Allows to hide crypto mentions and exchange rate for NFT purchases if enabled for your partner Id. Contact us to set this up. | boolean | false | true, false |
isWarrantyDisabled | Optional | Allows to disable NFT warranty option for specific widget mount, even if it is enabled for your partnerId and smart contract. | boolean | false | true, false |
fullname | No | 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