v1
latestOpenAPI 3.1.02026-08-042453938.9 KBWebhooks
Create a webhook
Create a new webhook endpoint to receive real-time event notifications. Requires a secret key (sk_).
Important: The secret is only returned once on creation. Save it immediately for HMAC signature verification. Public keys (pk_) cannot access this endpoint.
Signature verification:
const signature = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');
// Compare with X-Drip-Signature header
post/v1/webhooks
Request body
Example request
{
"url": "https://api.example.com/webhooks/drip",
"events": [
"charge.succeeded",
"charge.failed",
"customer.balance.low"
],
"description": "Production billing notifications"
}Response
Webhook created
Example response
{
"id": "whk_abc123def456",
"url": "https://api.example.com/webhooks/drip",
"events": [
"charge.succeeded",
"charge.failed",
"customer.balance.low"
],
"description": "Production billing events",
"isActive": true,
"secret": "whsec_abcdef123456789...",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"message": "Save the secret - it will not be shown again!"
}