Withdrawal Request

API Overview

The Withdrawal Request API is used to create withdrawal orders, supporting multiple withdrawal methods and channels. Merchants can submit withdrawal requests through this API to obtain withdrawal processing results.

API Information

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

Request Parameters

Basic Parameters

ParameterRequiredTypeDescription
uidYesstringMerchant account
currencyYesstringCurrency
bank_idNointBank ID, parameter values see backend "Channel Bank List"
orderidYesstringOrder number generated by merchant platform, unique
notify_urlYesstringAsynchronous notification URL
amountYesstringAmount submitted by merchant, accepts two decimal places
customNostringRemarks
user_nameNostringReal name (required for some channels)
useripYesstringIP address of merchant member
timestampYesstringUnix timestamp, 10 digits
bank_accountNostringAccount holder name
bank_noNostringBank account number
bank_nameNostringBank name
bank_provinceNostringProvince where the bank is located
bank_cityNostringCity where the bank is located
bank_subNostringBank branch
bank_ifscNostringIFSC (required for India) IFSC code contains 11 alphanumeric characters, first four characters are letters, last six characters are numbers or letters and numbers
signYesstringData signature
pay_codeYesstringChannel code, parameter values see "Channel Codes" at the end

Dynamic Field Parameters

Different withdrawal 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 withdrawal order.

Get Field Rules Example:

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

Field Rules Response Example:

{
    "status": 10000,
    "result": {
        "data": {
            "pay_code": "1004",
            "name": "Korea Withdrawal",
            "description": "Withdrawal through Korea payment",
            "form_fields": [
                {
                    "name": "bank_id",
                    "label": "Bank ID",
                    "type": "select",
                    "required": true,
                    "max_length": 100,
                    "placeholder": "Please select Bank ID",
                    "options": [
                        {
                            "bankID": 1001,
                            "name": "KB Kookmin Bank"
                        }
                    ],
                    "validation_rules": ["required", "integer"]
                },
                {
                    "name": "bank_account",
                    "label": "Account Holder Name",
                    "type": "input",
                    "required": true,
                    "max_length": 50,
                    "placeholder": "Please enter account holder name",
                    "options": null,
                    "validation_rules": ["required", "string", "max:50"]
                }
            ]
        }
    }
}

Integration Recommendations:

  1. After the user selects a withdrawal channel, call /channel/formRule to get the field requirements for that channel
  2. Dynamically generate the withdrawal form based on the returned form_fields
  3. Ensure all required fields (required: true) are included when submitting the withdrawal 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

Response Examples

Success Response Example

{
  "status": 10000,
  "result": {
    "transactionid": "123"
  },
  "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
  • 10006: Insufficient Balance
  • 10007: Withdrawal Limit Exceeded

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
  6. Balance Check: Ensure sufficient account balance before withdrawal
  7. Limit Management: Pay attention to single and daily withdrawal limits

Withdrawal Process

  1. Get Field Rules: Call /channel/formRule to get field requirements for withdrawal channel
  2. Generate Withdrawal Form: Dynamically generate withdrawal form based on field rules
  3. Submit Withdrawal Request: Call /applyfor API to submit withdrawal order
  4. Handle Response: Process the response accordingly
  5. Asynchronous Notification: Receive asynchronous notifications for withdrawal status changes

Support

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