Skip to content

2、Loan

2.1、Loan interface

URL: https://${domain}/api/transferOrder

     Please replace ${domain} with your actual service domain name.

Type:POST

Content-Type:application/json

Description: This API is used to initiate a transfer request, including parameters such as merchant information, order details, payee information, and callback address.

Body-parameters:

ParameterTypelimitRequiredDescription
mchNostring32trueMerchant number
appIdstring32trueApplication ID
mchOrderNoString32trueMerchant order number
amountLong20truePayment amount (unit: cents, minimum value 1000)
accountNoString32truebank account number
accountNameString256truePayee name
emailString256truePayee email
bankNameString32truebank code (Refer to item 5)
userPhoneString32truePayee’s mobile phone number
notifyUrlString256truePayment result callback address
signString256truesign
reqTimeInt11trueRequest timestamp (seconds)

Request-example:

js
{
    "mchNo": "M1735112701",
    "appId": "676bb7fefb715596544e2210",
    "mchOrderNo": "PAYOUT_TEST_0009",
    "amount": "1600",
    "accountNo": "1234567890",
    "accountName": "test",
    "email": "test@gmail.com",
    "bankName": "001",
    "userPhone": "0123456789",
    "phone": "0123456789",
    "notifyUrl": "http://domain.com/notify",
    "sign": "B5C3EC55B093C9DE54EBB1199D0FFE7D",
    "reqTime": "1739413509"
}

2.1、Loan results

response format:Content-Type:application/json

Response-fields:

ParameterTypeDescription
codeIntCall result: 0 indicates success, other values ​​indicate failure
dataObjectContains specific data information
msgstringResult description
signstringSignature, used to verify the integrity and authenticity of data

data object field:

ParameterTypeDescription
accountNamestringPayee name
accountNostringbank account number
amountLongPayment amount
bankNamestringbank code
mchOrderNostringMerchant order number
stateIntPayment status: 0-Order generated, 1-Transfer in progress, 2-Transfer successful, 3-Transfer failed, 4-Order closed
transferIdstringUnique order number generated by the transfer system

Response-example:

js
{
    "code": 0,
    "data": {
        "accountName": "sasitorn",
        "accountNo": "7542123898",
        "amount": 1600,
        "bankName": "001",
        "mchOrderNo": "PAYOUT_TEST_0009",
        "state": 1,
        "transferId": "T1889869535179149313"
    },
    "msg": "SUCCESS",
    "sign": "3C256A7C86E0A60AC50C10964D52EBBD"
}

TIP

•After receiving the response, be sure to validate the sign field to ensure the data has not been tampered with.

•Determine the payment status of the current order based on the value of state, and take corresponding business logic processing.

•Use HTTPS protocol to ensure the security of data transmission.