Skip to main content

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":"EUR","returnUrl":"","tradeType":"APP","productType":"Food","productName":"Ice Cream"}

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

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

API Secret Key:

uahr4nhailyq55yubuhuncnprfac73bcbz2qfafsevic1jruwunioxtoaozy122f

Signature Should be:

F9D1D5F928674D21F98F60F5BD6B5344F9F24E4DB587CDF85022852B2D144FBF33BABEBCC889E8247E1ADD0D82EE48C58F4E61352FDD6F4FDC89D07BE94038E9

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):

16112329224285RhaTrZPhknNv0kDSA2UQ67cPMVNS4sA{"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-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVAMXVTMIuttHcP1kvSk9V39S7BqDbY+LC9JfwMzyoubo3fdsqBf4EmB1PfBUigcOL5YBqMKGEE6xmVw6SXCTH4JwXdqJ4IRiXf76YMt6PB0dMzu/qCmhaGFGkqT6vJM0hHyEbtS/P3FR9ZU+eaOvynLWbFvXTzIoctZM1IvDrCwIDAQAB-----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