Webhooks
Get an HTTP request when something important happens on your account.
Setting up an endpoint
Open Webhooks in the dashboard, add an HTTPS URL and choose the events you want. You get a signing secret once. Use Send test to check your endpoint.
Events
| Event | Sent when |
|---|---|
payment.succeeded | A payment is confirmed and credits are added. |
credits.low | Your balance drops below your alert threshold (set in Settings). |
credits.expired | Monthly plan credits expire at the end of a period. |
Payload
POST https://example.com/webhooks/pulseemetrics
Content-Type: application/json
PulseEmetrics-Event: credits.low
PulseEmetrics-Signature: sha256=3f1c…
{
"id": "evt_9f1c2a7b3d4e5f60",
"type": "credits.low",
"created": "2026-10-14T16:00:00.000Z",
"data": { "balance": 80, "threshold": 100 }
}Verifying the signature
The signature is the HMAC-SHA256 of the raw request body, keyed with your endpoint’s signing secret and hex-encoded. Always verify it before trusting a request.
import crypto from "crypto";
export function isValid(rawBody, header, secret) {
const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const a = Buffer.from(expected), b = Buffer.from(header || "");
return a.length === b.length && crypto.timingSafeEqual(a, b);
}import hmac, hashlib
def is_valid(raw_body: bytes, header: str, secret: str) -> bool:
expected = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, header or "")Delivery
- Respond with any
2xxstatus within 6 seconds. - Endpoints must be public HTTPS URLs. Localhost and private network addresses are rejected.
- The last delivery status of each endpoint is shown in the dashboard.