1. Examples of encryption and signature
English
  • Chinese
  • English
  • Open API Documentation
  • Payin
    • Payin Order - General
    • Payin Order - India
    • Payin Order - Philippines
    • Payin Order - Indonesia
    • Payin Order - Vietnam
    • Payin Order - Cryptocurrency
    • Payin Order - China
    • Payin Order - Malaysia
    • Payin Order - Pakistan
    • Payin Order - Thailand
  • Payout
    • Payout Order - General
    • Payout Order - India
    • Payout Order - Philippines
    • Payout Order - Indonesia
    • Payout Order - Vietnam
    • Payout Order - Cryptocurrency
    • Payout Order - Malaysia
    • Payout Order - Pakistan
    • Payout Order - Thailand
  • Callback Notification
    • Callback Description
    • Collection Callback
    • Payout Callback
  • Query API
    • Collection Order Query
    • Payout Order Query
    • Wallet Query
  • Examples of encryption and signature
    • Go Language Encryption and Signature Example
    • Python Encryption and Signature Example
    • PHP encryption and signature example
    • Node.js encryption and signature example
    • Environment variables and request body JSON example
    • Java encryption and signature example
  • Other instructions
    • Response Status Description
    • Order Status Description
    • Payment Method List
    • Bank Code List
    • Checkout iframe Copy Function Support Description
    • Backend Login Instructions
  1. Examples of encryption and signature

Environment variables and request body JSON example

Environment Variables#

config.env#

# test API configuration
APP_ID=M2025349U5KYS
APP_SECRET=YSb17jNkNuchSUafy8s@2O4Ee!ZQ#i%uZAqw^kLMR^7CTg9#V7Msl2Dp@108Ox73
API_DATA_KEY=cnRDSnNaQWdxUHVibHY0aHYzcjdubTh4YUhtY1UxVXY=
MERCHANT_ID=2000555916775682049

# API endpoint
# This can be the sandbox API host or production host depending on the environment
API_BASE_URL=https://test.com
API_BASE_URL=http://localhost:8080
TIMESTAMP=1766679071128
NONCE=986d6d6f73325eb3fc4aa96b35610c12

# Encryption method can be set to aes-gcm-v1
ENCRYPT_METHOD=None

# dev
APP_ID=M20253504WTEX
APP_SECRET=nB3AEyZHftPr%4r4sA8m*x4!moQBdLSLnDZCmmdX1*bPvRipNL#ibytmlzUA5Jl6
API_DATA_KEY=SThob05jVkhiMHBkRGloN1VGSW5hVnJ0OGFLS2tvekE=
MERCHANT_ID=2000883285752385537

Request Body JSON#

body.json#

{
    "amount": 88986,
    "currency": "INR",
    "description": "Test order",
    "extra": {},
    "callback_url": "https://wwww.baidu.com",
    "order_no": "ORDER17662504400002zvsAE",
    "paymentMethod": "CASHIER_IN",
    "return_url": "https://wwww.baidu.com",
    "timeout": 0
  }
  
Modified at 2026-05-29 13:15:02
Previous
Node.js encryption and signature example
Next
Java encryption and signature example
Built with