跳至主要内容

OnChain Notify

HTTP Request​

POST /v5/bybitpay/onchain/notify

Request Parameters​

ParameterRequiredTypeComments
notifyTypetruestringNotify type: ONCHAIN_REFUND, ONCHAIN_PARTIAL_REFUND
merchantTradeNooneofstringMerchant trade order number, required if payId is not provided
payIdoneofstringThe Bybit order ID, required if merchantTradeNo is not provided
amounttruedoubleRefund amount
currencytruestringRefund currency
onChainInfotrueObjectUser block chain info
onChainInfo.chainTypetruestringThe receiver's chain type (BSC/TRX/ARBI/LTC/SOL/ETH/TON/APTOS)
onChainInfo.chainAddresstruestringThe receiver's chain address
onChainInfo.blockHashtruestringThe block hash

Response Parameters​

ParameterTypeComments
retCodenumberReturn Code, 100000: success, not 0: failed, See \<Error Code>
retMsgstringReturn Message

Request Example​

POST /v5/bybitpay/onchain/notify HTTP/1.1
Host: api2.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1736233200000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"notifyType": "ONCHAIN_REFUND",
"merchantTradeNo": "af8c2d1-5b3e-4a9f-b6c7-8d2e1f3a4b5c",
"payId": "01JY2KM5QNPXR8S4HTJZT9BC12",
"amount": "20",
"currency": "USDT",
"onChainInfo": {
"chainType": "TRC20",
"chainAddress": "TXxx...xxxx",
"blockHash": "17D8E6558DC60E702A6B57E1B9B7060D"
}
}

Response Example​

{
"retCode": 100000,
"retMsg": "success"
}