Payout API
| Parameter Name | Type | Required | Example | Description |
|---|---|---|---|---|
| mchId | string | ✅ | LEtest067 | Required: Merchant ID / Note: Merchant ID is not the same as Merchant Number |
| mchOrderNo | string | ✅ | 202503110001 | Merchant Order ID |
| amount | int | ✅ | 10000 | Required: Amount (in cents) must be a multiple of 100 / Actual amount is 100, so 10000 is required |
| currency | string | ✅ | INR | Required: Currency / Currency |
| phoneNumber | String(30) | ❌ | 6888889999 | Optional: Phone Number, must start with [6-9] and be 10 digits long |
| payerEmail | String | ❌ | 123@gmail.com | Optional: Standard email format must include @ and . where @ has at least 2 characters before it |
| accountName | string | ❌ | Optional: Recipient Account Name, 2-48 characters long | |
| accountNo | string | ✅ | Required: Recipient Account Number, must be a real account number | |
| accountBankCode | string | ✅ | BANK | Required: Bank Code, must be "BANK" |
| notifyUrl | string | ✅ | https://merchant.com/notify | Required: Callback URL |
| extra | string | ✅ | Required: Fill IFSC or VPA value, must be a real value | |
| sign | string | ✅ | 5E0AA05D… | Required: Signature |
| remark | string | ❌ | Optional: Remark |
Request Example
jsx
POST /api/agentpay/apply
mchId="The merchant ID provided by the operation"
mchOrderNo="202503110001"
amount=10000
currency="INR"
phoneNumber="6888889999"
payerEmail="123@test.com"
accountName="12312312"
accountNo="12312312"
accountBankCode="BANK"
remark="123123"
notifyUrl="http://localhost:8081/api/pay/notifyUrl"
extra="{"value":"AIRP0000001"}" // 12313 位置应该是ifsc的值
sign="79B1E1C4F3290FBB6CB2FA2CAE2BA67C"Response Example
jsx
{
"retCode": "SUCCESS", // Return Code
"retMsg": "Payout application successful", // Return Message
"agentpayOrderId": "Le198311136382210", // Payout Order ID
"fee": 1200, // Fee (in smallest currency unit)
"extra": null, // Extended Field
"status": 1, // Status
"sign": "106A36489C4B624FD23BF92F4ABF6272" // Signature
}▶️ Query Payout Order
| Parameter Name | Type | Required | Description |
|---|---|---|---|
| mchId | string | ✅ | Merchant ID / Note: Merchant ID is not the same as Merchant Number |
| mchOrderNo | String(30) | ✅ | Merchant Order ID, either mchOrderNo or agentpayOrderId is required |
| agentpayOrderId | String(30) | ✅ | Payout Order ID, either mchOrderNo or agentpayOrderId is required |
| reqTime | String(20) | ✅ | Request Time, format: yyyyMMddHHmmss |
| sign | String(32) | ✅ | Signature Value, see Signing Algorithm |
** Request Example**
jsx
POST /api/pay/orderquery
mchId="LEtest067"
agentpayOrderId="Le20250311182001"
mchOrderNo="20160427210604000490"
reqTime="20250311182001"
sign="C380BEC2BFD727A4B6845133519F3AD6"Response Example
jsx
{
"retCode": "SUCCESS",
"mchOrderNo": "AP1538919309174",
"agentpayOrderId": "Le20250311182001",
"channelPayNo": "testutr13",
"amount": 8000,
"status": 2,
"fee": 3,
"errorMessage": "error message",
"sign": "3B166CA71811D4A0FEC25D511A365ED3"
}▶️ Payout Callback
The system will post the payment result to the merchant's notifyUrl through a POST callback, and the callback information is written in the URL:
jsx
notify?amount=20000&mchOrderNo=Test17651877680001&fee=900&channelPayNo=12300000000&sign=8B9676B45CFF978622915903D3EE1969&agentpayOrderId=test1997968440790409217&status=2&errorMessage=Rejected after secondary reviewThe merchant should return a plain text "success" as the response.
💡 Parameter Description
| Parameter Name | Type | Description / Description |
|---|---|---|
| amount | string | Order Amount |
| mchOrderNo | string | Merchant Order ID |
| fee | string | Fee Amount |
| channelPayNo | string | UTR Number |
| agentpayOrderId | string | Payout Order ID |
| status | string | Order Status |
| errorMessage | string | Error Message: Returned when the order status is 3 (Failed) |
| sign | string | Signature Value |
▶️ Balance Query
| Parameter Name | Type | Required | Example | Description |
|---|---|---|---|---|
| mchId | string | ✅ | 20001222 | Merchant ID / Note: Merchant ID is not the same as Merchant Number |
| reqTime | string | ✅ | 20181009171032 | Request Initiation Time, format: yyyyMMddHHmmss |
| sign | string | ✅ | 5E0AA05D… | Signature |
Request Example
jsx
POST /api/agentpay/query_balance
mchId="LEtest067"
reqTime="20211111"
sign="79B1E1C4F3290FBB6CB2FA2CAE2BA67C"Response Example
jsx
{
"retCode": "SUCCESS",
"retMsg": null,
"busNo": "FLBTEST064",
"amount": 1410065308,
"frozenAmount": 157999,
"availableAmount": 1409907309,
"pendingAmount": 0,
"unsettledAmount": 0
}Parameter Description
- amount: Total Balance
- frozenAmount: Frozen Balance
- availableAmount: Available Balance
- pendingAmount: Pending Amount
- unsettledAmount: Unsettled Amount
