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
1
Register a hook
2
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.