Hello support team,
I have been struggling for days trying to authenticate a request for Binance Pay API v3 today on January 2024.
Here I share the sample raw post with real data that I have collected with fiddler so you can verify in your system if the request is authenticated correctly:
POST https://bpay.binanceapi.com/binancepay/openapi/v3/order HTTP/1.1
Connection: Keep-Alive
Content-Type: application/json
Accept: application/json
User-Agent: BinancePayClient/v1.0.0.0
BinancePay-Timestamp: 1705724955616
BinancePay-Nonce: VeTfR5mdAKjbeErxBXTl20JayTiCz4sb
BinancePay-Certificate-SN: nodrehtlbjychgajh5pdm1ndzleiddglcvuzt4dxjcfvdn9oxzsyyo9nvoej3n5r
BinancePay-Signature: 18A3E3DEE1605241117240735A1E05F60199EDB134EB09B6236809C976AEDD8EBD08EBD6CEB6A21A1199A2792CD06F8F52684E6C1F00FE63A8AB30B500F3967A
Content-Length: 350
Host: bpay.binanceapi.com
1705724955616
VeTfR5mdAKjbeErxBXTl20JayTiCz4sb
{“env”:{“terminalType”:“WEB”},“merchantTradeNo”:“43556435764df4”,“orderAmount”:0.01,“currency”:“USDT”,“description”:“Test Product”,“goodsDetails”:[{“goodsType”:“02”,“goodsCategory”:“Z000”,“referenceGoodsId”:“0001”,“goodsName”:“Test Product”,“goodsDetail”:“Test Product”}],“returnUrl”:“”,“cancelUrl”:“”}
And this is the response from api server:
{“status”:“FAIL”,“code”:“400002”,“errorMessage”:“Signature for this request is not valid.”}
Let me know if you can help me figure out if there is something wrong with the request signature.
Here is an attached screenshot of my request in hexadecimal format:
Waiting for your answer.
Regards.