Dex3
Merchant DashboardHome
  • 👋Introduction
    • Dex3 API
    • Payment Gateway
    • Payout System
  • 🌟Getting Started
    • Create merchant
  • ⚙️Connect to API
    • Connect API
  • 🚩Merchant Status
    • Get Merchant Status
  • 🪙Payment Gateway
    • Create New Payment
      • Create Signature
    • Get Payment Status
    • Get Payment Data
    • Payment Success Webhook
      • Verify Webhook Signature
  • 🫴Payout System
    • Create New Payout
      • Create Signature
    • Get Payout Status
    • Get Payout Data
    • Payout Success Webhook
      • Verify Webhook Signature
    • Payout Contracts
Powered by GitBook
On this page
  • Overview
  • Process
  • Sample code in Javascript

Was this helpful?

  1. Payout System
  2. Create New Payout

Create Signature

Signature generation and verification is mandatory to ensure the request being called is not tampered during the transit.

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.

  • Construct String: Concatenate the necessary parameters into a single string before applying the hash function. The parameters typically include:

    • order_id: The unique identifier for the order or transaction.

    • merchant_public: The public key of your merchant.

    • amount: The amount of the transaction.

    • receiver_value: The receiver value (address or email).

    • merchant_private: The private key of the merchant.

  • Apply Hash Function: Use a secure hashing algorithm such as SHA-256 to calculate the hash value of the before-hash string.

  • Pass the signature variable along with other parameters to the 'New Payment' endpoint.

Sample code in Javascript

import sha256 from 'crypto'; //Install crypto package

const merchantPublic = process.env.MERCHANT_PUBLIC;
const merchantPrivate = process.env.MERCHANT_PRIVATE;

const string = order_id + merchantPublic + amount + receiver_value + merchantPrivate;
const signature = sha256(string); //Sha256, hex digest
PreviousCreate New PayoutNextGet Payout Status

Last updated 1 year ago

Was this helpful?

🫴