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
  • Endpoint
  • Headers
  • Parameters
  • Example

Was this helpful?

  1. Payout System

Create New Payout

With this method, merchants can create payout links from their backend applications. Use this method when your customers want to withdraw funds from your application.

PreviousVerify Webhook SignatureNextCreate Signature

Last updated 1 year ago

Was this helpful?

Endpoint

POST https://api.dex3.io/api/v1/createpayout

A successful POST request typically returns a 200

Mandatory : Make sure to generate signature along with other parameters.

Headers

Name
Value

Content-Type

application/json

merchant_public

YOUR MERCHANT PUBLIC

Parameters

Key

Description

Datatype

order_id

Required - Pass a unique order id which you will track within your application

varchar(200)

productName

Required - Name of the product

varchar(50)

amount

Required - Amount in USD Important : Amount must be multiplied by 100. Example : For $1, pass 100 For $200, pass 20000

int

receiver_type

Required - Address : Refers to a wallet address. Only wallet address mentioned in the 'receiver_value' will be able to claim payout. Email : Refers to a email address. Email OTP is sent to the email provided in 'receiver_value'. Only after verifying the email, the user can claim payout via connected wallet.

varchar (address | email)

receiver_value

Enter 'receiver_value' based on 'receiver_type. I f 'receiver_type' is address, then pass wallet address. If 'receiver_type' is email, then pass email address.

varchar

expiration

Required - Enter 0 for no expiry Enter number in seconds to allow validity for payment.

int

webhook

Optional - Your webhook URL where you want to get notified when the payment is complete

url

success_redirect

Optional - Success URL, where you want your users to be sent to once they complete the payout.

url

cancel_redirect

Optional - Cancel URL, where you want your users to be sent to when they cancel the payment

url

notes

Optional - Send any additional tracking info which you will use to process the payment. Make sure to JSON.stringify() if you are passing along as a json.

json

signature

Required - Create signature (See 'Create Signature' endpoint) as a means to identify if the payment is originally coming from your servers.

varchar

Example

{
    "order_id": "1004",
    "productName": "Withdrawal from Acme",
    "amount": "10000",
    "receiver_type": "address",
    "receiver_value": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "notes": "{\"user_id\": \"3\"}",
    "expiration": "0",
    "webhook": "https://www.dex3.io/webhooksample",
    "signature": "1bcc26ec7886280f452370006826e0f3872fdf20e6aa0685dc982d8c4dbf7f6c"
}
{
    "state": true,
    "data": {
        "payoutLink": "https://pay.dex3.io/payout/TrxFJPpto1azEMQtWKMLkXhLGYWdkm",
        "payoutData": {
            "payout_id": "TrxFJPpto1azEMQtWKMLkXhLGYWdkm",
            "order_id": "1004",
            "productName": "Withdrawal from Acme",
            "amount": "10000",
            "receiver_type": "address",
            "receiver_value": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "expiration": 0,
            "webhook": "https://www.dex3.io/webhooksample",
            "notes": "{\"user_id\": \"3\"}",
            "created": 1710857177
        }
    }
}
{
    "state": false,
    "error": {
        "message": "Duplicate order id",
        "code": 400,
        "errData": false
    }
}
🫴
Read 'Using Signatures'