Signing a payment request
We recommend using our helper to construct the required signatures as described in Generate signed data. However, if that is not possible, you can follow this guide to do it manually.
🦉
Code snippet for signing a payment request
Open Recipe
The data you will need to construct your signature is as follows:
Property | Type | Description | Example |
---|---|---|---|
address | String | The user’s address that receives the token/NFT. It 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 |
commodity | String | Cryptocurrency which should be sent to the smart contract, see Supported coins and blockchains | commodity:'ETH' |
network | String | Network for the cryptocurrency, see Supported coins and blockchains | network: 'ethereum' |
commodity_amount | Number | Amount of cryptocurrency necessary for executing the given smart contract. The precision is 8 decimal places; please round up, or you will get a 9004 signature error code. | 0.03 (maximum 8 decimal places) |
sc_address | String | The address of the smart contract. | 0x00000000000000000000000000000 00000000002 |
sc_input_data | String | Input data used for the smart contract execution in hex format. For Tezos, this must be Michelson code passed as JSON transformed into hex format. See Forming input data. | 0x40c10f1900000000000000000000000 085f584812fc19c69e4dd586f06df93aa7 bdadd4d000000000000000000000000 000000000000000000000000016345 785d8a0000 |
Updated 4 months ago
Documentation related to this page