Endpoint
Request Body
A friendly name for the webhook to help identify it
The HTTPS URL where webhook events will be sent. Must be a valid URL
The type of webhook. Supported values:
PRE_TRANSACTION: Called before a transaction is processed (can modify or reject)POST_TRANSACTION: Called after a transaction is completed (notification only)
Whether the webhook is active and should receive events
Maximum time to wait for a response from the webhook endpoint, in seconds
Number of times to retry if the webhook call fails
Response
Unique identifier for the webhook
The friendly name of the webhook
The webhook endpoint URL
The webhook type (PRE_TRANSACTION or POST_TRANSACTION)
Whether the webhook is currently active
Timeout in seconds
Number of retry attempts
Timestamp when the webhook was created (ISO 8601 format)
Timestamp of the last execution (ISO 8601 format)
Whether the last execution was successful
Example Request
Pre-Transaction Webhook
Post-Transaction Webhook
Example Response
Webhook Payload
When your webhook is triggered, it will receive a POST request with the following payload:Expected Webhook Response
For PRE_TRANSACTION Webhooks
Your webhook endpoint must respond with:For POST_TRANSACTION Webhooks
Simply acknowledge receipt:Error Responses
Error message describing what went wrong
Common Errors
- 400 Bad Request: Invalid request body or URL format
- 500 Internal Server Error: Failed to register webhook
Webhook Types Explained
PRE_TRANSACTION
- Purpose: Validate, modify, or reject transactions before processing
- Use Cases:
- Fraud detection
- Compliance checks
- Balance verification
- Transaction modification
- Behavior: Transaction is blocked until webhook responds
- Timeout Critical: Yes, must respond quickly
POST_TRANSACTION
- Purpose: Notification after transaction completes
- Use Cases:
- Send confirmation emails
- Update external systems
- Trigger workflows
- Logging and analytics
- Behavior: Fire and forget (doesn’t block transaction)
- Timeout Critical: No, retries handle failures
Best Practices
- Use HTTPS: Always use secure HTTPS endpoints
- Set appropriate timeouts: PRE_TRANSACTION webhooks should have short timeouts (5-10s)
- Implement idempotency: Handle duplicate webhook calls gracefully
- Return quickly: Process webhooks asynchronously if possible
- Monitor webhook health: Track
last_runandlast_successfields - Validate payloads: Verify webhook authenticity before processing
- Handle retries: Implement proper retry logic for failed webhooks
Security Considerations
- Verify requests: Implement webhook signature verification
- Use IP whitelisting: Restrict access to known Blnk IP addresses
- Rate limiting: Protect your endpoint from abuse
- Log failures: Monitor and alert on webhook failures