đ Secure Payment Gateway
Signature Method: SHA512(payload + api_key + secret_key + merchant_key)
Payload Format: Sorted key-value pairs as query string (key1=value1&key2=value2)
Note: secret_key is NOT sent in request - backend looks it up from database using api_key. merchant_key must be sent and must match the API key's merchant_key.
đ¤ Request Payload Structure
| Field | Description | Type | Required |
|---|---|---|---|
api_key |
Your API key for authentication | string | Yes |
merchant_key |
Merchant key that matches your API key | string | Yes |
signature |
SHA512 hash of (payload + api_key + secret_key + merchant_key) | string | Yes |
data.amount |
Payment amount | number (float) | Yes |
data.currency |
Currency code (USDT, USD, SGD) | string | No |
data.type |
Payment type (fixed, custom) | string | No |
data.markup_percentage |
Optional markup percentage | number (float) | No |
data.network |
bsc, polygon, or tron | string | No (default bsc) |
data.asset_id |
Enabled payment asset id (disambiguates multi-token chains) | string | No |
đ Signature Generation Example
Complete Signature String Format:
api_key=test_key&data.amount=100&data.currency=USD&data.type=fixed&merchant_key=merchant_key
Step-by-Step Breakdown:
- Build Payload: Sort the
dataobject keys alphabetically and create query string:amount=100¤cy=USD&type=fixed
- Concatenate for Signature: Combine in this exact order (no separators):
payload + api_key + secret_key + merchant_key
amount=100¤cy=USD&type=fixedtest_keyyour_secret_key_heremerchant_key
- Generate SHA512 Hash:
signature = SHA512("amount=100¤cy=USD&type=fixedtest_keyyour_secret_key_heremerchant_key")
â ī¸ Note: Replace "your_secret_key_here" with your actual secret key. The secret_key is NOT sent in the request - it's only used locally to generate the signature.
â ī¸ Important: The payload keys (from data object) must be sorted alphabetically. The signature string concatenates in this exact order: payload + api_key + secret_key + merchant_key (no separators between them).
đ Check Payment Status
Signature Method: SHA512(api_key + secret_key + merchant_key + session_id)
Purpose: Check if a payment is completed or pending using the session_id from QR generation
Note: secret_key is NOT sent in request - backend looks it up from database using api_key.
đ¤ Request Payload Structure
| Field | Description | Type | Required |
|---|---|---|---|
api_key |
Your API key for authentication | string | Yes |
merchant_key |
Merchant key that matches your API key | string | Yes |
session_id |
Session ID returned when you generate a QR payment | string | Yes |
signature |
SHA512 hash of (api_key + secret_key + merchant_key + session_id) | string | Yes |
đ Cancel Order
Signature Method: SHA512(api_key + secret_key + merchant_key + session_id)
Purpose: Cancel an order by setting it to expired and canceled status. The order will be marked as canceled and expires_at will be set to current time.
Note: secret_key is NOT sent in request - backend looks it up from database using api_key. Cannot cancel already completed or canceled orders.
đ¤ Request Payload Structure
| Field | Description | Type | Required |
|---|---|---|---|
api_key |
Your API key for authentication | string | Yes |
merchant_key |
Merchant key that matches your API key | string | Yes |
session_id |
Session ID of the order to cancel | string | Yes |
signature |
SHA512 hash of (api_key + secret_key + merchant_key + session_id) | string | Yes |