Binance Pay 订单查询与签名对账控制地图
已验证事实边界
1. Binance Pay common rules describe HTTPS transfer, JSON request and response format, UTF-8 encoding and HMAC-SHA512 signature requirements. 2. Binance Pay request headers include BinancePay-Timestamp, BinancePay-Nonce, BinancePay-Certificate-SN and BinancePay-Signature. 3. Binance Pay common rules state that request timestamps are processed within a narrow time window and include INVALID_TIMESTAMP as a business error. 4. Binance Pay Query Order can use either merchantTradeNo or prepayId when one of the two identifiers is present. 5. Binance Pay Query Order response fields include merchantId, prepayId, transactionId, merchantTradeNo, tradeType and status. 6. A merchant reconciliation checklist should not treat a local order row, a callback payload or a user screenshot as final payment evidence without querying the official order state.
收起完整分析
决策矩阵
文章表格:可横向滑动,或聚焦表格区域后使用方向键。
| Check | What it means | Practical action | Unknown to keep explicit |
|---|---|---|---|
| Identifier binding | merchantTradeNo and prepayId identify the payment workflow from different sides of the integration | store both identifiers and reconcile them before fulfillment | private merchant database uniqueness errors not visible in public docs |
| Signature layer | HMAC-SHA512 signing proves request construction only when timestamp, nonce and body are correct | verify header construction independently from order business logic | whether a production secret or IP allowlist is already compromised |
| Time window | timestamp drift can invalidate a signed request even when the body is correct | sync server time and log non-secret timestamp skew labels | clock drift during regional outage or worker queue delay |
| Status query | the query endpoint is the official source for order state checks | query status before irreversible fulfillment or refund logic | temporary state transitions between callback receipt and query response |
| Callback boundary | callbacks and push notifications need signature validation and business-state reconciliation | treat callbacks as signals that require confirmation | duplicate retries and delayed webhook delivery |
| Evidence hygiene | use identifiers, status, endpoint name and timestamp labels instead of secrets | redact certificate serials only when internal policy treats them as sensitive | merchant-specific logging policy |
| Stop rule | fulfillment should pause when signature, identifier or official status cannot be reconciled | hold fulfillment until official query state and local order state agree | manual support override conditions |
来源地图
- Binance Developer Docs:API Specification Common Rules(binance-pay-common-rules)
- Binance Developer Docs:Create Order V2(binance-pay-create-order-v2)
- Binance Developer Docs:Query Order(binance-pay-query-order)
控制说明
1. Identifier binding
这一项要求读者先把公开来源翻译成操作规则。这里的含义是:merchantTradeNo and prepayId identify the payment workflow from different sides of the integration。可执行动作是:store both identifiers and reconcile them before fulfillment。仍然未知的是:private merchant database uniqueness errors not visible in public docs。因此本文不会把未知部分包装成收益承诺、牌照承诺、审批保证、恢复保证、结算保证、可用性保证、价格暗示或平台排名。
2. Signature layer
这里的含义是:HMAC-SHA512 signing proves request construction only when timestamp, nonce and body are correct。可执行动作是:verify header construction independently from order business logic。仍然未知的是:whether a production secret or IP allowlist is already compromised。
操作测试也必须很窄。这就是本节保留边界的原因。
3. Time window
这里的含义是:timestamp drift can invalidate a signed request even when the body is correct。可执行动作是:sync server time and log non-secret timestamp skew labels。仍然未知的是:clock drift during regional outage or worker queue delay。
操作测试也必须很窄。这就是本节保留边界的原因。
4. Status query
这里的含义是:the query endpoint is the official source for order state checks。可执行动作是:query status before irreversible fulfillment or refund logic。仍然未知的是:temporary state transitions between callback receipt and query response。
操作测试也必须很窄。这就是本节保留边界的原因。
5. Callback boundary
这里的含义是:callbacks and push notifications need signature validation and business-state reconciliation。可执行动作是:treat callbacks as signals that require confirmation。仍然未知的是:duplicate retries and delayed webhook delivery。
操作测试也必须很窄。这就是本节保留边界的原因。
6. Evidence hygiene
这里的含义是:use identifiers, status, endpoint name and timestamp labels instead of secrets。可执行动作是:redact certificate serials only when internal policy treats them as sensitive。仍然未知的是:merchant-specific logging policy。
操作测试也必须很窄。这就是本节保留边界的原因。
7. Stop rule
这里的含义是:fulfillment should pause when signature, identifier or official status cannot be reconciled。可执行动作是:hold fulfillment until official query state and local order state agree。仍然未知的是:manual support override conditions。
操作测试也必须很窄。这就是本节保留边界的原因。
仍需明确的未知项
- private merchant database uniqueness errors not visible in public docs
- whether a production secret or IP allowlist is already compromised
- clock drift during regional outage or worker queue delay
- temporary state transitions between callback receipt and query response
- duplicate retries and delayed webhook delivery
- merchant-specific logging policy
- manual support override conditions
实用结论
Binance Pay 商户集成应把创建订单、请求签名和订单查询当作三个独立控制项。Binance Pay common rules 要求 HTTPS、JSON、HMAC-SHA512 signature、timestamp、nonce、certificate serial number 与 signature headers;query order endpoint 可通过 merchantTradeNo 或 prepayId 查询状态,并返回 transactionId、tradeType、status 等字段。实用结论是:履约前先对账 merchantTradeNo、prepayId、timestamp window、signature result 与 status,而不是把本地订单记录当成付款证据。 本文停在证据边界内,帮助读者决定下一步核验什么,而不是把公开文档改写成私人账户、钱包、回调、政策框架、结算路径或流动性头寸在任何未来条件下都能成功的承诺。
来源与证据
03- API Specification Common Rules · developers.binance.com
- Create Order V2 · developers.binance.com
- Query Order · developers.binance.com