Webhooks Overview
Webhooks allow your application to receive real-time notifications when events occur in Blaze. Instead of polling the API for changes, Blaze will send HTTP POST requests to your configured endpoint.
How Webhooks Work
- Register a webhook URL using the Webhooks API or the Store API
- Receive HTTP POST requests at your URL when events occur
- Process the event payload and return a
200response to acknowledge receipt
Registering a Webhook
curl -X POST \
"https://api.partners.blaze.me/api/v1/partner/webHooks" \
-H "x-api-key: YOUR_PARTNER_KEY" \
-H "Authorization: YOUR_DEVELOPER_KEY" \
-H "Content-Type: application/json" \
-d '{
"webHookType": "TRANSACTION_UPDATE",
"webHookUrls": ["https://your-app.com/webhooks/blaze"]
}'
Managing Webhooks
Use the Webhooks API to:
- List all registered webhooks
- Get webhook details by ID
- Create new webhooks
- Update existing webhook URLs or status
- Delete webhooks
Best Practices
- Respond quickly — Return a
200status within a few seconds; process the payload asynchronously - Verify the source — Validate that webhook requests come from Blaze
- Handle duplicates — Your endpoint should be idempotent, as webhooks may occasionally be sent more than once
- Use HTTPS — Always use an HTTPS endpoint for your webhook URL