Webhooks
This guide details how to integrate webhooks with AddGlow, adhering to the Standard Webhooks Specification. Webhooks provide a way for applications to receive real-time notifications from AddGlow when specific events occur.
Setting Up Webhooks
You can add a webhook through the AddGlow dashboard. Go to the brand dashboard and navigate to Developers > Webhooks.
- Webhook URL: Define the URL where notifications should be sent. (Must be an HTTPS URL.)
- Events: Specify which events should trigger notifications.

Webhook Payload
Each webhook payload from AddGlow follows a structured format to maintain consistency across applications:
- Type: Identifies the event type (e.g.,
order.placed
,user.updated
). - Data: Contains the specific data relevant to the event.
- Timestamp: Timestamp of when the event occurred, formatted as an ISO 8601 string.
You can find the full specification for the webhook payload in our API documentation.
Verifying Webhook Payloads
See the Standard Webhooks Specification for details on how to verify the authenticity of incoming webhook payloads. They also provide client libraries in various programming languages to simplify the verification process.
Here's a simplified example of how to handle and validate incoming webhook payloads in a Node.js application:
import express from 'express';
import { Webhook } from 'standardwebhooks';
const app = express();
const webhookSecret = process.env.ADDGLOW_WEBHOOK_SECRET; // Make sure to set this in your environment
const webhook = new Webhook(webhookSecret);
// Note: The body must be parsed as raw data for signature verification
app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
try {
const verifiedPayload = webhook.verify(req.body, req.headers);
console.log('Verified Webhook Data:', verifiedPayload);
res.status(200).send('Webhook verified');
} catch (error) {
console.error('Error verifying webhook:', error.message);
res.status(400).send(error.message);
}
});
const PORT = process.env.PORT || 4000;
app.listen(PORT, () => {
console.log(`Server is running on http://localhost:${PORT}`);
});