Hooks
Register new hooks
Register a new hook with the TypeScript SDK.
POST
Register new hooks
Use
blnk.Hooks.create to register a webhook that Blnk calls before or after a transaction.
blnk.Hooks.create
| Field | Description |
|---|---|
name | Descriptive name for the hook. |
url | Endpoint URL Blnk calls when the hook runs. |
type | PRE_TRANSACTION or POST_TRANSACTION. |
active | Whether the hook is enabled. |
timeout | Maximum time in seconds allowed for the hook to execute. |
retry_count | Maximum number of retry attempts if the hook fails. |
Response shape
201 Created
| Field | Description |
|---|---|
id | Unique ID for the hook. Use it to view, update, or delete the hook. |
created_at | Date and time the hook was created. |
last_run | Date and time the hook last executed. |
last_success | Whether the most recent execution succeeded. |
Related docs
How webhooks work
Hook types, payloads, and execution.
Register new hooks
HTTP request and response schema.