Signature string is mandatory to ensure the request was sent from your server

Overview

The signature generation process involves creating a unique cryptographic hash value based on payout parameters and your merchant private key to ensure data integrity and authenticity.

Process

Generate signature when you are creating a new payout.

  1. Construct String: Concatenate the necessary parameters into a single string before applying the hash function. The parameters typically include:
ItemsDescription
order_idYour internally created order_id
order_amountThe order_amount you passed for this payment
is_order_usdThe is_order_usd value you passed for this payment
token_idToken ID you passed for this payment
receiverReceiver wallet address
merchant_privateYour private key.

  1. Apply Hash Function: Use a secure hashing algorithm such as SHA-256 to calculate the hash value of the before-hash string.
  2. Pass the signature variable along with other parameters to the 'New Payout' endpoint.
//Request Body const payout = { //Your payout request body }; //YOUR MERCHANT KEY const merchantPrivate = process.env.PRIVATE_KEY; //Concat payout parameters const payload = payout.order_id + Number(payout.order_amount) + payout.is_order_usd + payout.token_id + payout.receiver + merchantPrivate; // Generate SHA-256 hash of the JSON body const signature = createHash('sha256').update(payload).digest('hex'); //hex digest // Add signature to payout object payout.signature = signature; //Perform Create new payout API call with payout object