跳到主要内容

FAQ

Frequently Asked Questions

Posted request, but faced 403 ERROR.

Exception Details:

The request could not be satisfied.
Request blocked. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Solution: Please carefully check your request path is following document, for example:

create order: https://bpay.binanceapi.com/binancepay/openapi/order

Posted request, but faced error with code "100001001".

Exception Details:

{"status":"ERROR","type":"SYS","code":"100001001","errorData":"System abnormality"}

Solution:

  • Please check if you used GET, POST method should be used.
  • Please check if you didn't put content-type: application/json in request header
  • Please check if you didn't post body in request

Posted request, but faced error with code "400002"

Exception Details:

{"code":"400002","msg":"Signature for this request is not valid."}

Solution A

Please check if your sign logic is incorrect. You can test with below parameters:

Timestamp:

1611232922428

Nonce:

5RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA

Notification body:

{"merchantId":"98765987","subMerchantId":"98765987","merchantTradeNo":"9825382937292","totalFee":25.17,"productDetail":"Greentea ice cream cone","currency":"USDT","returnUrl":"","tradeType":"APP","productType":"Food","productName":"Ice Cream"}

The generated payload must be (there MUST be one new line at the end):

1611232922428
5RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA
{"merchantId":"98765987","subMerchantId":"98765987","merchantTradeNo":"9825382937292","totalFee":25.17,"productDetail":"Greentea ice cream cone","currency":"USDT","returnUrl":"","tradeType":"APP","productType":"Food","productName":"Ice Cream"}

API Secret Key:

uahr4nhailyq55yubuhuncnprfac73bcbz2qfafsevic1jruwunioxtoaozy122f

Signature Should be:

253B9241C7331C0F02A0F5417BDDD4CD88124D3E188C0BA0E3EF121D36844B7F4D1A69AD8A1C3C7FF34901115E35A2530B672CF7430902E9862D69867689FD9F

Solution B

Please check if your json request body used ', should use "

Solution C

Please check if your code changed the request json body after signing. Some may reformat the json.

Solution D

Please check if you made the signature to upper case

Posted request, but faced error with code "400003"

Exception Details:

{"code":"400003","msg":"Timestamp for this request is outside of the recvWindow."}

Solution:

  • Please check the request header field 'BinancePay-Timestamp', it should be UnixTimestamp in milliseconds, not in seconds.
  • Please check if the request timestamp was within 1s to Binance Server.

Failed to verify the signature in webhook notification

Solution A

Please check if your sign logic is incorrect. Test your code logic with these parameters, if it's not successful, then you need double check your code logic.

Timestamp:

1611232922428

Nonce:

5RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA

Notification body:

{"bizType":"PAY","data":"{\"merchantTradeNo\":\"9825382937292\",\"totalFee\":0.88000000,\"transactTime\":1619508939664,\"currency\":\"EUR\",\"commission\":0,\"openUserId\":\"1211HS10K81f4273ac031\",\"productType\":\"Food\",\"productName\":\"Ice Cream\",\"tradeType\":\"WEB\",\"transactionId\":\"M_R_282737362839373\"}","bizId":29383937493038367292,"bizStatus":"PAY_SUCCESS"}

The generated payload must be (there MUST be one new line at the end):

1611232922428
5RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA
{"bizType":"PAY","data":"{\"merchantTradeNo\":\"9825382937292\",\"totalFee\":0.88000000,\"transactTime\":1619508939664,\"currency\":\"EUR\",\"commission\":0,\"openUserId\":\"1211HS10K81f4273ac031\",\"productType\":\"Food\",\"productName\":\"Ice Cream\",\"tradeType\":\"WEB\",\"transactionId\":\"M_R_282737362839373\"}","bizId":29383937493038367292,"bizStatus":"PAY_SUCCESS"}

Public key:

-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVAMXVTMIuttHcP1kvSk9V39S7
BqDbY+LC9JfwMzyoubo3fdsqBf4EmB1PfBUigcOL5YBqMKGEE6xmVw6SXCTH4JwX
dqJ4IRiXf76YMt6PB0dMzu/qCmhaGFGkqT6vJM0hHyEbtS/P3FR9ZU+eaOvynLWb
FvXTzIoctZM1IvDrCwIDAQAB
-----END PUBLIC KEY-----

Verification must be passed against this original signature in header:

VtniwOFAi4oBKFnvHhY6UZ+wPARf7+yWVbE61Hc7JVdRgqKJ40Yk9k5Gb2Y0S0VLUYOOOhUNUsD7R8GDEr6WH84sAEf8bXa1xYMiyjgeGleTg1MxRJCtrHcxMeMCEXPWmKTeLhn6O+cdvDGq4ZpcTTiQnEvk5xHPcxFrBT637zg=

Solution B

If above testing is working fine, please check if you formatted the notification body and used the formatted body for signature check

Pay Order Webhook notification showing different BizIds.

This is a common error if you are using nodejs. What we sent over are actually the same BizIds, however there is a problem with nodejs parsing and processing large numbers, hence resulting in this error.

Solution A

Treating the whole body as string instead.

Solution B

Please turn off any body parser middleware if you are using it.

Solution C

Turn off any body parser middleware and treat the whole body as string.