Webhooks
Configure outgoing webhooks to receive real-time notifications when events occur in your account.
Webhook Endpoints
GET
/v1/webhooksPOST
/v1/webhooksDELETE
/v1/webhooks/:idcurl
curl -X POST https://api.icodrip.com/v1/webhooks \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/icodrip",
"events": ["conversion.created", "payout.completed"]
}'Webhook Events
affiliate.createdA new affiliate signed upaffiliate.approvedAn affiliate was approvedconversion.createdA new conversion was trackedconversion.approvedA conversion was approvedpayout.createdA payout was initiatedpayout.completedA payout was successfully sentSignature Verification
Every webhook request includes an X-Icodrip-Signature header containing an HMAC-SHA256 signature of the raw request body, signed with your webhook secret. Always verify this signature before processing any webhook payload.
Node.js
import crypto from "crypto";
function verifySignature(payload: string, signature: string, secret: string) {
const expected = crypto
.createHmac("sha256", secret)
.update(payload)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}