Skip to content

Payout API

Parameter NameTypeRequiredExampleDescription
mchIdstringLEtest067Required: Merchant ID / Note: Merchant ID is not the same as Merchant Number
mchOrderNostring202503110001Merchant Order ID
amountint10000Required: Amount (in cents) must be a multiple of 100 / Actual amount is 100, so 10000 is required
currencystringINRRequired: Currency / Currency
phoneNumberString(30)6888889999Optional: Phone Number, must start with [6-9] and be 10 digits long
payerEmailString123@gmail.comOptional: Standard email format must include @ and . where @ has at least 2 characters before it
accountNamestringOptional: Recipient Account Name, 2-48 characters long
accountNostringRequired: Recipient Account Number, must be a real account number
accountBankCodestringBANKRequired: Bank Code, must be "BANK"
notifyUrlstringhttps://merchant.com/notifyRequired: Callback URL
extrastringRequired: Fill IFSC or VPA value, must be a real value
signstring5E0AA05D…Required: Signature
remarkstringOptional: 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 NameTypeRequiredDescription
mchIdstringMerchant ID / Note: Merchant ID is not the same as Merchant Number
mchOrderNoString(30)Merchant Order ID, either mchOrderNo or agentpayOrderId is required
agentpayOrderIdString(30)Payout Order ID, either mchOrderNo or agentpayOrderId is required
reqTimeString(20)Request Time, format: yyyyMMddHHmmss
signString(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 review

The merchant should return a plain text "success" as the response.

💡 Parameter Description

Parameter NameTypeDescription / Description
amountstringOrder Amount
mchOrderNostringMerchant Order ID
feestringFee Amount
channelPayNostringUTR Number
agentpayOrderIdstringPayout Order ID
statusstringOrder Status
errorMessagestringError Message: Returned when the order status is 3 (Failed)
signstringSignature Value

▶️ Balance Query

Parameter NameTypeRequiredExampleDescription
mchIdstring20001222Merchant ID / Note: Merchant ID is not the same as Merchant Number
reqTimestring20181009171032Request Initiation Time, format: yyyyMMddHHmmss
signstring5E0AA05D…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