Overview
The Transaction Event webhook allows your application to receive real-time notifications of transaction results occurring within EQHub blockchain services. When a transaction is executed on the blockchain, EQHub sends a webhook notification containing detailed transaction information directly to your configured endpoint.
Webhook Payload Structure Example
Below is the JSON payload structure you will receive for each transaction event:
{
"app": "EQHub",
"data": {
"to": "Sender Address",
"from": "Receiver Address",
"status": 1,
"is_reorg": 0,
"block_height": 1,
"micro_chain_id": 1,
"transaction_id": 1,
"transaction_hash": "0x149e3f18a4a1a7ebef16f0d612e0db220b5dc1c7dc3b63dc13be8616fe4f2120"
},
"event_name": "TRANSACTION",
"service_identifier": "TRANSACTION"
}
Payload Field Descriptions
Field | Type | Description |
---|---|---|
app | String | Fixed value: "EQHub" |
data.to | String | Receiver’s blockchain address (or contract address) |
data.from | String | Sender’s blockchain address |
data.status | Integer | Transaction status (e.g., 1 for success, 0 for failure) |
data.is_reorg | Integer | Indicates blockchain reorganization (0: No, 1: Yes) |
data.block_height | Integer | Height of the blockchain block containing the transaction |
data.micro_chain_id | Integer | Identifier for the microchain involved in the transaction |
data.transaction_id | Integer | Unique internal identifier for the transaction |
data.transaction_hash | String | Blockchain hash representing the transaction |
event_name | String | Fixed value: "TRANSACTION" |
service_identifier | String | Fixed value: "TRANSACTION" |
How to Receive Transaction Events
To enable webhook notifications:
- Set the
useWebhook
parameter totrue
when making transaction API requests. - Provide a valid
webhookUrl
. IfwebhookUrl
is not provided, notifications will default to the initially configured URL.
Example:
{
"useWebhook": true,
"webhookUrl": "https://your-callback-url.com/webhook"
}