Webhook Events
Webhooks allow your system to automatically receive real-time updates from Bullring Finance when specific events occur. You can register a webhook URL to listen for event notifications and trigger your own workflows. Bullring Finance can notify your server in real time about changes to subaccount status, payment confirmations, and withdrawal progress. To start receiving webhooks, register your endpoint via your Dashboard.How It Works
When an event occurs, Bullring Finance sends an HTTPPOST request to your registered URL with a JSON payload describing the event. Your endpoint must return a 2xx status code to acknowledge receipt.
All webhook requests are signed using a shared secret. You should verify the request signature before processing.
Verifying signature
All webhook requests from Bullring will include a header key X-BULLRING-SIGNATURE, which contains the timestamp and a signed hash string in the format:-
Get the value of the
X-BULLRING-SIGNATUREheader. -
Split the string by
,. -
Then, split each part by
=. - Extract the value at index 1 from each.
- The extracted timestamp
- The request payload (body)
- The secret (available on your Bullring dashboard after creating a webhook)
==.
Since Bullring uses the SHA256 hashing algorithm with base64 encoding, here’s how to verify the signature using Node.js:
Verification Example
, between the timestamp and the payload ${timestamp},${payload} when creating the hash.
Make sure your server is prepared to respond with a
2xx status code to acknowledge receipt.