Deposit Request

API Overview

The Deposit Request API is used to create deposit orders, supporting multiple deposit methods and channels. Merchants can submit deposit requests through this API to obtain deposit links or custom checkout information.

API Information

Request URL: /pay Request Method: POST Content-Type: application/json

Request Parameters

Basic Parameters

ParameterRequiredTypeDescription
uidYesstringMerchant account
currencyYesstringCurrency
bank_idNostringBank ID, parameter values see backend "Bank List"
orderidYesstringOrder number generated by merchant platform, unique
notify_urlYesstringAsynchronous notification URL
return_urlYesstringSynchronous return URL
amountYesstringAmount submitted by merchant, accepts two decimal places (for Indian channels, only integers are accepted)
useripYesstringIP address of merchant member
timestampYesstringGMT timestamp
user_nameNostringReal name
signYesstring32-bit uppercase MD5 signature value
pay_codeYesstringChannel code
customNostringCustom parameter
path_typeNostringWhether to use custom checkout, if required, fill this field with 2 (if not needed, can omit this parameter)

Dynamic Field Parameters

Different recharge channels (pay_code) may require different mandatory fields. To ensure you submit the correct parameters, please call the /channel/formRule API to get the field requirements for that channel before creating a recharge order.

Get Field Rules Example:

{
    "uid": "test1",
    "currency": "VND",
    "pay_code": "812",
    "timestamp": 1758210270,
    "userip": "127.0.0.1",
    "sign": "200AF28BB3E4C4F0E93EBD48DB1FF623"
}

Field Rules Response Example:

{
    "status": 10000,
    "result": {
        "data": {
            "pay_code": "812",
            "name": "Bank Transfer",
            "description": "Recharge through bank transfer",
            "form_fields": [
                {
                    "name": "bank_id",
                    "label": "Bank ID",
                    "type": "select",
                    "required": true,
                    "max_length": 100,
                    "placeholder": "Please select the corresponding Bank ID",
                    "options": [
                        {
                            "bankID": 6763,
                            "name": "AB Bank"
                        }
                    ],
                    "validation_rules": ["required", "string", "max:100"]
                }
            ]
        }
    }
}

Integration Recommendations:

  1. After the user selects a recharge channel, call /channel/formRule to get the field requirements for that channel
  2. Dynamically generate the recharge form based on the returned form_fields
  3. Ensure all required fields (required: true) are included when submitting the recharge request
  4. For fields with type: "select", use the values from options as choices

Response Parameters

Basic Response Structure

ParameterFieldTypeDescription
Status CodestatusintMore error codes see status code table
Response DataresultobjectReturns JSON string when status code is "Success"
Data Signaturesignstring32-bit uppercase MD5 signature value

result Object Description

ParameterFieldTypeDescription
Transaction IDtransactionidintTransaction ID generated by payment platform, unique
Checkout LinkpayurlstringDirect link to open for recharge
AmountpointsfloatTransaction amount
Custom CheckoutresultarrayCustom checkout required parameters

result Custom Checkout Parameter Description

ParameterFieldTypeDescription
Bank Namebank_namestringReceiving card bank name
Bank Branch Namebank_branchstringReceiving card branch name
Account Holder Namebank_owner_namestringReceiving card owner
Account Numberbank_account_nostringReceiving card bank account number
Reference CodemarkstringTransaction reference

Response Examples

Standard Checkout Response Example

{
  "status": 10000,
  "result": {
    "transactionid": "123",
    "payurl": "https://www.example.com/deposit/123",
    "points": "50001",
    "result": []
  },
  "sign": "xxx"
}

Custom Checkout Response Example

{
  "status": 10000,
  "result": {
    "transactionid": "123",
    "payurl": "https://www.example.com/recharge/123",
    "points": "50001",
    "result": {
      "bank_name": "Industrial and Commercial Bank of China",
      "bank_branch": "Beijing Branch",
      "bank_owner_name": "Zhang San",
      "bank_account_no": "6222021234567890123",
      "mark": "123456"
    }
  },
  "sign": "xxx"
}

Error Handling

When a request fails, the system will return the corresponding error status code. Common error codes include:

  • 10000: Success
  • 10001: Parameter Error
  • 10002: Signature Verification Failed
  • 10003: Duplicate Order Number
  • 10004: Amount Format Error
  • 10005: Bank ID Does Not Exist

Signature Algorithm

Signature generation rules:

  1. Sort all request parameters by parameter name ASCII code from small to large
  2. Concatenate into string using URL key-value pair format
  3. Add merchant secret key at the end of the string
  4. Perform MD5 encryption on the concatenated string
  5. Convert the encryption result to uppercase

Integration Notes

  1. Security: Always use HTTPS for API requests
  2. Timestamp: Ensure server time synchronization to avoid timestamp validation failures
  3. Order ID: Merchant order IDs must be unique to avoid duplicate submissions
  4. Amount: Pay attention to decimal places based on different channels
  5. Signature: Verify response signatures to ensure data integrity

Support

For technical support and questions, please contact our development team or refer to the complete API documentation.