Skip to content

Payout API Development Documentation

This document describes the payout platform Open API and helps merchants integrate payout order creation, order query, and balance query services.

1. Table of Contents

1.1. Create Payout Order

1.2. Query Payout Order

1.3. Query Payout Balance

2. Interface Description

2.1 Basic Information

2.1.1 Request Format

All interfaces use the POST method and the request body format is application/json.

2.1.2 Common Request Parameters

ParameterTypeRequiredDescriptionNotes
mchNostringYesMerchant numberAssigned by the platform. It is recommended to use the merchant API key/account identifier.
reqTimeint64YesRequest timestamp13-digit millisecond timestamp
signstringYesRequest signatureSee Signature Algorithm

2.1.3 Response Format

All interfaces use the following unified response format:

ParameterTypeDescription
codeint32Status code. 0 means success; other values mean failure.
msgstringResponse message
signstringResponse signature. It may be empty in some failure scenarios.
dataobjectResponse data. See each API section for details.

2.1.4 Signature Description

To ensure request parameters are not tampered with, the platform uses MD5 digest signature authentication for Open API requests.

For complete signing rules, examples, and code samples, see Signature Algorithm.

Notes:

  1. The sign field itself does not participate in signing.
  2. Parameter names are case-sensitive and must match the API field names.
  3. Amount fields are transferred as integers according to the platform unit. Do not pass decimals.
  4. reqTime must be a 13-digit millisecond timestamp.

2.1.5 Amount Unit

Payout amount fields are transferred as integers. The unit is 0.0001 CNY, which means the real amount multiplied by 10000.

Real AmountAPI amount
0.5 CNY5000
1 CNY10000
100 CNY1000000

3. API Details

3.1 Create Payout Order

3.1.1 Scenario

The merchant submits a payout order. After the platform accepts it, the platform payout order ID and order state are returned. The merchant order number must be unique. Duplicate submissions return an existing-order error.

3.1.2 Endpoint

ItemContent
URL/api/v1/payout/order
MethodPOST

Body Parameters

json
{
  "mchNo": "10001",
  "mchOrderNo": "PO202406010001",
  "amount": 1000000,
  "accountName": "Zhang San",
  "accountNo": "6222020202020202020",
  "bankName": "ICBC",
  "bankBranch": "Shanghai Branch",
  "notifyUrl": "https://merchant.example.com/notify/payout",
  "payCode": "BANK",
  "remark": "Payout test order",
  "reqTime": 1717651200000,
  "sign": "MD5_UPPER_SIGN"
}
FieldTypeRequiredDescription
mchNostringYesMerchant number
mchOrderNostringYesMerchant payout order number. It must be unique on the merchant side.
amountint64YesPayout amount. Unit: 0.0001 CNY
accountNamestringYesPayee name
accountNostringYesPayee account/card number
bankNamestringYesBank or institution name
bankBranchstringYesBranch or institution note
notifyUrlstringYesAsynchronous notification URL. If notification is not required, pass NOURL. Empty strings are not recommended.
payCodestringYesPayout channel code
remarkstringNoMerchant remark, retained for reconciliation
reqTimeint64Yes13-digit millisecond timestamp
signstringYesUppercase MD5 signature

3.1.3 Return Codes

codeDescription
0Accepted successfully
200026Signature verification failed
OtherBusiness failure. See msg for details.

3.1.4 Response Example

Success

json
{
  "code": 0,
  "msg": "success",
  "sign": "MD5_UPPER_SIGN",
  "data": {
    "payoutOrderId": "PO20240601000001",
    "mchOrderNo": "PO202406010001",
    "amount": 1000000,
    "state": 1,
    "createdAt": 1717651200000
  }
}

Failure

json
{
  "code": 200026,
  "msg": "Signature verification failed"
}

Data Fields

FieldTypeDescription
payoutOrderIdstringPlatform payout order ID
mchOrderNostringMerchant payout order number
amountint64Payout amount. Unit: 0.0001 CNY
stateint32Order state. See Order State.
createdAtint64Creation time, 13-digit millisecond timestamp

3.2 Query Payout Order

3.2.1 Scenario

The merchant can query the payout order state by merchant payout order number or platform payout order ID.

3.2.2 Endpoint

ItemContent
URL/api/v1/payout/query
MethodPOST

Body Parameters

json
{
  "mchNo": "10001",
  "mchOrderNo": "PO202406010001",
  "payoutOrderId": "PO20240601000001",
  "reqTime": 1717651200000,
  "sign": "MD5_UPPER_SIGN"
}
FieldTypeRequiredDescription
mchNostringYesMerchant number
mchOrderNostringNoMerchant payout order number. Choose one between mchOrderNo and payoutOrderId.
payoutOrderIdstringNoPlatform payout order ID. Choose one between payoutOrderId and mchOrderNo.
reqTimeint64Yes13-digit millisecond timestamp
signstringYesUppercase MD5 signature

3.2.3 Return Codes

codeDescription
0Query successful
200026Signature verification failed
OtherBusiness failure. See msg for details.

3.2.4 Response Example

Success

json
{
  "code": 0,
  "msg": "success",
  "sign": "MD5_UPPER_SIGN",
  "data": {
    "payoutOrderId": "PO20240601000001",
    "mchOrderNo": "PO202406010001",
    "amount": 1000000,
    "state": 3,
    "successTime": 1717651800000,
    "remark": ""
  }
}

Failure

json
{
  "code": 404,
  "msg": "Order not found"
}

Data Fields

FieldTypeDescription
payoutOrderIdstringPlatform payout order ID
mchOrderNostringMerchant payout order number
amountint64Payout amount. Unit: 0.0001 CNY
stateint32Order state. See Order State.
successTimeint64Success time, 13-digit millisecond timestamp
remarkstringFailure reason or remark

3.3 Query Payout Balance

3.3.1 Scenario

The merchant queries current available balance and frozen balance.

3.3.2 Endpoint

ItemContent
URL/api/v1/payout/balance
MethodPOST

Body Parameters

json
{
  "mchNo": "10001",
  "reqTime": 1717651200000,
  "sign": "MD5_UPPER_SIGN"
}
FieldTypeRequiredDescription
mchNostringYesMerchant number
reqTimeint64Yes13-digit millisecond timestamp
signstringYesUppercase MD5 signature

3.3.3 Return Codes

codeDescription
0Query successful
200026Signature verification failed
OtherBusiness failure. See msg for details.

3.3.4 Response Example

Success

json
{
  "code": 0,
  "msg": "success",
  "sign": "MD5_UPPER_SIGN",
  "data": {
    "mchNo": "10001",
    "mchName": "Test Merchant",
    "balance": 10000000,
    "frozenBalance": 500000
  }
}

Data Fields

FieldTypeDescription
mchNostringMerchant number
mchNamestringMerchant name
balanceint64Available balance. Unit: 0.0001 CNY
frozenBalanceint64Frozen balance. Unit: 0.0001 CNY

4. Asynchronous Notification

4.1 Notification Description

When a payout order reaches a final state, the platform pushes an asynchronous notification to the notifyUrl submitted by the merchant. If notifyUrl is NOURL, no notification is pushed for that order.

4.2 Request Method

ItemContent
MethodPOST
Content-Typeapplication/json
EncodingUTF-8
Notification URLThe notifyUrl submitted when creating the payout order

4.3 Notification Parameters

The platform sends the notification body in JSON format:

FieldTypeRequiredDescription
platform_order_nostringYesPlatform payout order ID
merchant_order_nostringYesMerchant payout order number
merchant_idint64YesPlatform merchant ID
amountint64YesOrder amount. Unit: 0.0001 CNY
actual_amountint64YesActual payout amount. Unit: 0.0001 CNY
success_amountint64YesSuccessful payout amount. Unit: 0.0001 CNY
statusint32YesOrder state. See Order State.
fail_reasonstringYesFailure reason. Usually empty when successful.
currencystringYesCurrency, for example RMB

After successfully processing the notification, return an HTTP 2xx status code and SUCCESS in the response body.

4.4 Notification Example

json
{
  "platform_order_no": "PO20240601000001",
  "merchant_order_no": "MCH202406010001",
  "merchant_id": 10001,
  "amount": 1000000,
  "actual_amount": 1000000,
  "success_amount": 1000000,
  "status": 3,
  "fail_reason": "",
  "currency": "RMB"
}

4.5 Merchant Response

The platform considers the notification successful only when both conditions are met: the HTTP status code is 2xx, and the response body is SUCCESS.

Merchant ResponsePlatform Handling
HTTP 2xx with response body SUCCESSNotification successful
Non-2xx HTTP status, or response body is not SUCCESSNotification failed. The response is recorded.
Timeout or network errorNotification failed. The error is recorded.

Response example:

text
SUCCESS

4.6 Idempotency

Use platform_order_no or merchant_order_no as the unique identifier when processing callback notifications. The same order may be notified more than once due to network retries or manual resend. Your system must avoid duplicate balance changes or duplicate order updates.

4.7 Notes

  1. Asynchronous notifications do not include an extra sign field. Use HTTPS, IP whitelist, and order information validation to protect callback security.
  2. amount, actual_amount, and success_amount are integer amounts. Unit: 0.0001 CNY.
  3. The callback endpoint should respond as quickly as possible. If processing takes more than 10 seconds, the platform may treat the notification as failed.

5. Status Codes

5.1 Common Status Codes

codeDescription
0Success
200026Signature verification failed
OtherBusiness failure. See msg for details.

5.2 Order State

stateDescription
0Pending
1Processing
2Reserved. Merchants do not need to treat it as a final state.
3Success
4Failed
5Rejected
6Reversed
7Processing

States 3, 4, 5, and 6 are final states. Handle final-state notifications idempotently.


6. Integration Process

6.1 Apply for Merchant Account

  1. Contact the platform to apply for a merchant account.
  2. Obtain the merchant number and merchant secret.
  3. Configure request IP whitelist and callback URL.

6.2 Development Integration

  1. Implement signature generation according to this document.
  2. Integrate payout order creation, order query, and balance query APIs.
  3. Implement the asynchronous notification receiving API and return SUCCESS after successful processing.
  4. Ensure idempotent handling for order numbers and callback notifications.

6.3 Testing

  1. Use test merchant number and secret to send requests.
  2. Confirm amount unit, signature, and timestamp format.
  3. Verify order creation, query, balance query, and asynchronous notification workflows.

6.4 Go Live

  1. Switch to production merchant number and secret.
  2. Configure production callback URL.
  3. Check server IP whitelist.
  4. Keep request and callback logs for troubleshooting.

7. FAQ

7.1 What should I do if signature verification fails?

  1. Confirm that sign is not included in the signature string.
  2. Confirm fields are concatenated in ASCII ascending order.
  3. Confirm empty fields are excluded.
  4. Confirm the correct merchant secret is appended.
  5. Confirm the final MD5 result is converted to 32-character uppercase.

7.2 Why cannot amount be passed as a decimal?

The API uses integer amount units. The unit is 0.0001 CNY. For example, real amount 1 CNY should be passed as 10000.

7.3 What happens if the order number is duplicated?

mchOrderNo is the unique merchant-side order number. Duplicate submissions of the same order number will be recognized as duplicate orders. Merchants should ensure global uniqueness.

7.4 Which order number should be used for order query?

Prefer the platform payoutOrderId. If it is not saved, mchOrderNo can also be used.

7.5 What should I do if callbacks cannot be received?

  1. Check whether notifyUrl is publicly accessible.
  2. Check whether the callback API can return HTTP 2xx and SUCCESS within 10 seconds.
  3. Check whether the callback API times out or returns errors.
  4. Check platform order logs and merchant service logs.

8. Contact

For any questions, contact platform technical support.


Document Version: v1.0

Last Updated: 2026-06-25

Payment API