Webhook Introduction
Whenever a bitcoin transaction's state changes, we can send a webhook to your server. The webhook will have all the data related to the transaction, and contain a bitvora signature in the header.
It is important to validate the signature of the webhook to ensure that the webhook is coming from bitvora, otherwise a malicious actor could send fake webhooks to your server which could result in a loss of funds.
Example Webhook Payload
headers: {
"bitvora-signature": "hmac-sha256 of the payload and the webhook secret"
}
payload: {
"event": "deposit.lightning.completed",
"data": {
"amount_sats": 100,
"chain_tx_id": null,
"created_at": "2024-08-29T16:30:03.868147Z",
"fee_sats": 0.5,
"id": "1e16666d-6192-4ae0-abcc-f8c08622cd49",
"lightning_invoice_id": "2919bd2e-b27a-41bc-9588-42cf3ff86500",
"metadata": null,
"network_type": "signet",
"rail_type": "lightning",
"recipient": "lntbs1u1pndpg0cpp5w6mpazzt6m2787xcujue0at36sv06zed0juevdtjdgsgye2uqscqdqcgf5hgan0wfsjqjtwwehkjcm9cqzzsxqrrsssp5xmaw5phx8f228uk4wy4fdft6q9xh3mlq5u2sudzk5kggc27ydypq9qxpqysgq0arjdtpwgq5n79kjq3z3mnzvkm2vy33h8fs8pkx38p9fwtuq9x9zcm6sgz9h3h4z626yt50l8g5yhytl4xq6rjcp8cf6rlk7nx9gfespqv867f",
"status": "settled",
"updated_at": "2024-08-29T16:30:03.868147Z"
}
}