Available in version 0.8.4 and later.
Note: Blnk only sends
transaction.* events to transaction hooks. Other events are not supported. See Supported events for the full list of transaction event names.Hook types
Blnk supports two hook types:PRE_TRANSACTION: before a transaction is appliedPOST_TRANSACTION: after a transaction is applied
- Pre-transaction
- Post-transaction
PRE_TRANSACTION runs before a transaction is applied.Use it for validation, fraud checks, or enriching transaction data while the transaction is still in an early state, for example QUEUED.PRE_TRANSACTION payload
Treat
data as the contract for your integration; fields depend on the transaction type and Blnk version. Always handle unknown keys safely when parsing JSON.Getting started
Register a hook
Register your webhook URL with the Hooks API:
| Field | Description |
|---|---|
name | Human-readable label for operators and logs. |
url | Absolute HTTPS or HTTP URL that accepts requests from Blnk. |
type | Either PRE_TRANSACTION or POST_TRANSACTION. |
active | When false, Blnk skips this hook until you enable it again. |
timeout | Maximum time in seconds Blnk waits for your endpoint to respond per attempt. |
retry_count | Maximum additional attempts after a failed delivery. |
201 Created
Test the hook
Create a transaction with. Blnk calls your hook URL when the transaction reaches the stage you registered,
PRE or POST.Confirm your endpoint receives an event with the expected payload and returns 2xx.Your hook endpoint should log or persist the delivery. If nothing arrives, confirm the hook is
active and the URL is reachable from Blnk Core,Retries and timeouts
When your hook endpoint is unreachable, times out, or returns a non-2xx response, Blnk retries the delivery with backoff—up to the retry_count you set when registering the hook.
timeout sets how long Blnk waits for your endpoint on each attempt.
retry_count sets the maximum additional attempts after a failed delivery.
A delivery that failed while your receiver was down can arrive minutes later once the endpoint recovers.
Related docs
Update, get, list, and delete hooks via the API reference.Update hooks
Change URL, timeout, or active state.
View hooks
Fetch a hook by id.
List hooks by type
List PRE or POST hooks.
Delete hooks
Remove a registered hook.