Skip to content

Query Allocation Order

Updated: 9/11/26, 8:21:59 PM

Description

Query allocation order details by allocation number, including status, amount, and per-receiver results. Local data only — no channel call; for real-time channel status use Sync Allocation Order instead.

Request

POST /unipay/query/alloc-order

  • Auth: RSA signature (@PaymentVerify)
  • Response: DaxResult<AllocOrderResult>

Parameters

Common params same as Pay - Common Parameters. Business parameters:

ParameterTypeRequiredMaxDescription
allocNostringNo*100Platform allocation number
bizAllocNostringNo*100Merchant allocation number

*At least one required. Priority: allocNo > bizAllocNo

Example

json
{
  "mchNo": "M200000001",
  "appId": "APP001",
  "reqId": "REQ20241201032",
  "reqTime": "2024-12-01 12:32:00",
  "sign": "Base64Signature",
  "allocNo": "A2024120112345700001"
}

Response

DaxResult<AllocOrderResult>, data fields:

FieldTypeDescription
allocNostringPlatform allocation number
bizAllocNostringMerchant allocation number
tradeNostringOriginal payment fund trade number
bizOrderNostringOriginal payment merchant order number
outAllocNostringChannel allocation number
amountlongTotal allocation amount (cents)
statusstringAllocation status (AllocOrderStatusEnum)
finishTimestringAllocation finish time (Beijing time, yyyy-MM-dd HH:mm:ss)
channelstringPayment channel
attachstringMerchant custom data
errorMsgstringError message
detailsobject[]Allocation detail list (per-receiver results)

Detail Item

FieldTypeDescription
receiverTypestringReceiver type (AllocReceiverTypeEnum)
receiverAccountstringReceiver account
receiverNamestringReceiver name
amountlongAllocation amount (cents)
resultstringDetail result (pending / success / fail)
errorMsgstringError message
finishTimestringDetail finish time (Beijing time, yyyy-MM-dd HH:mm:ss)

Example

json
{
  "code": 0,
  "msg": "success",
  "data": {
    "allocNo": "A2024120112345700001",
    "bizAllocNo": "ALOC20241201001",
    "tradeNo": "T2024120112345700001",
    "bizOrderNo": "ORDER20241201001",
    "outAllocNo": "202412012200000000000001",
    "amount": 10000,
    "status": "success",
    "finishTime": "2024-12-01 12:40:00",
    "channel": "alipay",
    "attach": "{\"orderId\": 123}",
    "details": [
      {
        "receiverType": "USER_ID",
        "receiverAccount": "2088xxxxxxxxxxxx",
        "receiverName": "Zhang San",
        "amount": 3000,
        "result": "success",
        "finishTime": "2024-12-01 12:40:00"
      },
      {
        "receiverType": "USER_ID",
        "receiverAccount": "2088yyyyyyyyyyyy",
        "amount": 7000,
        "result": "success",
        "finishTime": "2024-12-01 12:40:00"
      }
    ]
  },
  "sign": "Base64Signature",
  "resTime": "2024-12-01 12:32:00",
  "reqId": "REQ20241201032"
}

Usage Tips

  • Query is idempotent and returns locally persisted data only; the status may lag the channel — prefer Sync Allocation Order for real-time status.
  • Use details to verify each receiver's settlement; for fail details check errorMsg.
  • Amount fields are in cents (same for details[].amount), unlike the yuan unit used when initiating the allocation.

Official Website · Released under the GNU LGPL v3.0