Tài liệu tích hợp
Trang này chưa có bản Tiếng Việt; bên dưới là bản English.

Payout API std1

Three calls: apply for a payout, query a payout, query your balance; when a payout has a result we call you back (see Callbacks). All are POST forms and every response is a flat JSON object.

Common rules

Apply for a payout

ItemValue
MethodPOST
URLhttps://api.xx2system.xyz/std1/payout/apply
Request bodyapplication/x-www-form-urlencoded; charset=UTF-8
Body limit65536 bytes
Rate limit20 per second
IP allow-listchecked against your payout IP list; an empty list rejects everything
Responseapplication/json; charset=UTF-8

Request parameters

ParameterRequiredRuleDescription
mchIdyesformat [A-Za-z0-9_-]{1,32}Merchant ID
mchOrderNoyesformat [A-Za-z0-9_-]{1,64}Your order number, unique per merchant; resend with it when the result is unknown (see “Sending the same order number again”)
amountyesformat [1-9][0-9]{0,11}Payout amount, integer in the currency's minor unit; for a two-decimal currency 10000 means 100.00
currencynothree uppercase letters; only the platform currency (CNY) is accepted; omitted means that currencyCurrency
accountNameyes1–64 characters;no leading or trailing whitespace;no control characters;no invisible characters such as zero-width or bidi controlsPayee name
accountNoyesformat [\x21-\x7E]{5,255}Payee account: bank card, wallet account and so on; 5–255 visible ASCII characters (letters, digits, symbols), kept exactly as sent
bankNameyes1–64 characters;no leading or trailing whitespaceBank name (matched by name; there is no bank code)
bankBranchnoat most 128 charactersBranch
bankProvincenoat most 32 charactersProvince of the bank
bankCitynoat most 32 charactersCity of the bank
notifyUrlnoat most 256 characters;starts with http:// / https://Result callback URL; without it there is no callback and you query instead
remarknoat most 128 charactersYour own note; returned in queries and callbacks, never sent upstream
productIdnoformat [A-Za-z0-9_-]{1,32}For the official product ID code, please contact customer service; leave it out to use your default payout product. A product not opened for you or switched off gets MERCHANT_DISABLED
signyesformat [0-9A-Fa-f]{64}Signature, see Signatures

Response

ParameterPresent whenDescription
codealways(SUCCESS)Result code, see Error codes
mchIdalwaysMerchant ID
mchOrderNoalwaysYour order number
payoutNoalwaysPlatform payout number
amountalwaysPayout amount (minor units)
feealwaysFee (minor units), fixed when accepted
currencyalwaysCurrency
createTimealwaysAccepted at, Beijing time
signalwaysSignature
msgin failure responsesFailure reason (Chinese, for people)

Sending the same order number again

This order numberThis time's parametersYou get
acceptedexactly the same as the first timethe first accepted response, byte for byte; nothing is paid twice
rejectedexactly the same as the first timethe same rejection as the first time
accepted or rejectedanything differentORDER_NO_CONFLICT: nothing was done, the original is unaffected
no record—handled as a new request

Example

Example key (fake):0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef;Example merchant ID:DEMO0001

POST https://api.xx2system.xyz/std1/payout/apply

String to sign

accountName=张三&accountNo=6222021234567890123&amount=10000&bankName=中国工商银行&mchId=DEMO0001&mchOrderNo=ORDER-20260917-0001

sign

4d368047ec349d118d7865c7bcba91f1f152c72b41bba9f389be963630a22064

Request body

accountName=%E5%BC%A0%E4%B8%89&accountNo=6222021234567890123&amount=10000&bankName=%E4%B8%AD%E5%9B%BD%E5%B7%A5%E5%95%86%E9%93%B6%E8%A1%8C&mchId=DEMO0001&mchOrderNo=ORDER-20260917-0001&sign=4d368047ec349d118d7865c7bcba91f1f152c72b41bba9f389be963630a22064

Response(Accepted: funds frozen, not paid yet)

{"code":"SUCCESS","mchId":"DEMO0001","mchOrderNo":"ORDER-20260917-0001","payoutNo":"P20260917120000000001","amount":"10000","fee":"200","currency":"CNY","createTime":"2026-09-17 12:00:00","sign":"13dc9a6b36d02a8dc8fe08117a4b85cdf9e69d3bc50cc7c5010df98263d809e0"}

Response(Rejected (class B))

{"code":"INSUFFICIENT_BALANCE","msg":"可用余额不足","mchId":"DEMO0001","mchOrderNo":"ORDER-20260917-0001","sign":"9213d0f28d29dd694bf15c5797c985a3926a059157dfefaa81f71aae57c52331"}

Query a payout

ItemValue
MethodPOST
URLhttps://api.xx2system.xyz/std1/payout/query
Request bodyapplication/x-www-form-urlencoded; charset=UTF-8
Body limit65536 bytes
Rate limit50 per second
IP allow-listchecked against your payout IP list; an empty list rejects everything
Responseapplication/json; charset=UTF-8

Request parameters

ParameterRequiredRuleDescription
mchIdyesformat [A-Za-z0-9_-]{1,32}Merchant ID
mchOrderNoone of twoformat [A-Za-z0-9_-]{1,64}Your order number, unique per merchant; resend with it when the result is unknown (see “Sending the same order number again”)
payoutNoone of twoformat [A-Za-z0-9]{1,32}Platform payout number (from the accepted response)
signyesformat [0-9A-Fa-f]{64}Signature, see Signatures

Give at least one of mchOrderNo and payoutNo; if you give both they must belong to the same payout, otherwise you get ORDER_NOT_FOUND.

Response

ParameterPresent whenDescription
codealways(SUCCESS)Result code, see Error codes
mchIdalwaysMerchant ID
mchOrderNoalwaysYour order number
payoutNoalwaysPlatform payout number
amountalwaysPayout amount (minor units)
feealwaysFee (minor units), fixed when accepted
currencyalwaysCurrency
statusalwaysPayout status, see Status below
createTimealwaysAccepted at, Beijing time
finishTimewhen status is FAILED / REVERSED / SUCCESSWhen it entered the current status
failMsgwhen status is FAILEDCancellation reason
remarkalwaysYour note from the application
signalwaysSignature
msgin failure responsesFailure reason (Chinese, for people)

Status

StatusMeaning
PROCESSINGProcessing: accepted, funds frozen, no final result yet. May last hours or days; nothing is paid twice
SUCCESSPaid
FAILEDCancelled; funds returned to the available balance
REVERSEDReturned after payment (reversal); funds returned

Example

Example key (fake):0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef;Example merchant ID:DEMO0001

POST https://api.xx2system.xyz/std1/payout/query

String to sign

mchId=DEMO0001&mchOrderNo=ORDER-20260917-0001

sign

20f17f6d87cf293d6ced8c01c4c40d887d7846161e306d7610828fe333c83b25

Request body

mchId=DEMO0001&mchOrderNo=ORDER-20260917-0001&sign=20f17f6d87cf293d6ced8c01c4c40d887d7846161e306d7610828fe333c83b25

Response(Paid)

{"code":"SUCCESS","mchId":"DEMO0001","mchOrderNo":"ORDER-20260917-0001","payoutNo":"P20260917120000000001","amount":"10000","fee":"200","currency":"CNY","status":"SUCCESS","createTime":"2026-09-17 12:00:00","finishTime":"2026-09-17 12:05:30","sign":"6d415f531376788d1e915e70deeffb44e96f669aba651f32e33933255f650fa2"}

Query your balance

ItemValue
MethodPOST
URLhttps://api.xx2system.xyz/std1/balance/query
Request bodyapplication/x-www-form-urlencoded; charset=UTF-8
Body limit65536 bytes
Rate limit10 per second
IP allow-listchecked against your payout IP list; an empty list rejects everything
Responseapplication/json; charset=UTF-8

Request parameters

ParameterRequiredRuleDescription
mchIdyesformat [A-Za-z0-9_-]{1,32}Merchant ID
currencynothree uppercase letters; only the platform currency (CNY) is accepted; omitted means that currencyCurrency
signyesformat [0-9A-Fa-f]{64}Signature, see Signatures

Response

ParameterPresent whenDescription
codealways(SUCCESS)Result code, see Error codes
mchIdalwaysMerchant ID
currencyalwaysCurrency
balancealwaysTotal balance (minor units), including frozen funds
frozenAmountalwaysFrozen (minor units): payouts in flight and settlement requests
availableAmountalwaysAvailable (minor units) = balance − frozenAmount
signalwaysSignature
msgin failure responsesFailure reason (Chinese, for people)

availableAmount = balance − frozenAmount. Merchants allowed a negative balance may see negative values.

Example

Example key (fake):0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef;Example merchant ID:DEMO0001

POST https://api.xx2system.xyz/std1/balance/query

String to sign

mchId=DEMO0001

sign

a896e78745bd80092e80a28976a4f758ca0a713d74228db79806337828fd9695

Request body

mchId=DEMO0001&sign=a896e78745bd80092e80a28976a4f758ca0a713d74228db79806337828fd9695

Response(Balance)

{"code":"SUCCESS","mchId":"DEMO0001","currency":"CNY","balance":"500000","frozenAmount":"10200","availableAmount":"489800","sign":"0b6b91b47831daa89b4c350a6eb38b755d998df8fc168e503b68bacfa5b634fd"}