Signing a payment request

We recommend that you use our helper to construct the required signatures as described in Generate signed data however, in case that is not possible, you can follow this guide to do it manually.

The data you will need to construct your signature is as follows:

PropertyTypeDescriptionExample
addressStringThe user’s address that receives the token/NFT, will also act as a fallback address if a smart contract can't be executed. In case of fallback, we will transfer commodity_amount to this address.0x00000000000000000000000000000
00000000001
commodityStringCryptocurrency which should be sent to the smart contract see Supported coins and blockchainscommodity:'ETH'
networkStringNetwork for the cryptocurrency, see Supported coins and blockchainsnetwork: 'ethereum'
commodity_amountNumberAmount of cryptocurrency necessary for executing the given smart contract. Precision of 8 decimal places, please round up or you will get 9004 signature error code.0.03 (must be less than 8 decimal places)
sc_addressStringThe address of the smart contract.0x00000000000000000000000000000
00000000002
sc_input_dataStringInput data that will be used for the smart contract execution, in hex format.0x40c10f1900000000000000000000000
085f584812fc19c69e4dd586f06df93aa7
bdadd4d000000000000000000000000
000000000000000000000000016345
785d8a0000

The generated signature can be passed directly to the widget using the constant that was created. For example:

const wertWidget = new WertWidget({
    ...signature,
    ...otherWidgetOptions,
});