Appearance
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:
Parameter | Type | limit | Required | Description |
---|---|---|---|---|
mchNo | string | 32 | true | Merchant number |
appId | string | 32 | true | Application ID |
mchOrderNo | String | 32 | true | Merchant order number |
amount | Long | 20 | true | Payment amount (unit: cents, minimum value 1000) |
accountNo | String | 32 | true | bank account number |
accountName | String | 256 | true | Payee name |
String | 256 | true | Payee email | |
bankName | String | 32 | true | bank code (Refer to item 5) |
userPhone | String | 32 | true | Payee’s mobile phone number |
notifyUrl | String | 256 | true | Payment result callback address |
sign | String | 256 | true | sign |
reqTime | Int | 11 | true | Request 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:
Parameter | Type | Description |
---|---|---|
code | Int | Call result: 0 indicates success, other values indicate failure |
data | Object | Contains specific data information |
msg | string | Result description |
sign | string | Signature, used to verify the integrity and authenticity of data |
data object field:
Parameter | Type | Description |
---|---|---|
accountName | string | Payee name |
accountNo | string | bank account number |
amount | Long | Payment amount |
bankName | string | bank code |
mchOrderNo | string | Merchant order number |
state | Int | Payment status: 0-Order generated, 1-Transfer in progress, 2-Transfer successful, 3-Transfer failed, 4-Order closed |
transferId | string | Unique 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.