Webhooks
Manage webhook subscriptions and inspect the delivery event log. Create subscriptions to receive real-time notifications for case lifecycle events, payments, and chats. Use GET /webhooks/events to verify deliveries and POST /webhooks/events/{id}/replay to re-deliver a specific event.
- Base URL
https://customer-api.debitura.com- Authentication
- API key in the
XApiKeyheader
List all webhook subscriptions for the authenticated creditor.
/webhooksReturns all webhook subscriptions for the authenticated creditor. Secrets are never returned in list operations.
Returns
200 List of webhook subscriptions — a list of the objects below.
iduuidurlstringnullableeventsarray of stringsnullableisActivebooleancreatedUtcdatetimeupdatedUtcdatetimedisabledReasonstringnullablesecretstringnullableisTestModeboolean
curl https://customer-api.debitura.com/webhooks \-H "XApiKey: $DEBITURA_API_KEY"
[{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}]
Create a new webhook subscription.
/webhooksCreates a new webhook subscription for receiving real-time event notifications.
Available Events:
case.created- New collection case createdcase.updated- Case lifecycle changed (e.g., Active → Paused). Does not cover engagement phase changes (Pre-legal/Legal/Enforcement) — pollGET /cases/{id}orGET /cases/{id}/timelinefor the current phase; there is no phase-change event today.case.closed- Case closedpayment.created- Payment registered on casepayment.deleted- Payment reversed (deleted) on casechat.created- Chat message created on case
Validation Rules:
- URL must be HTTPS
- events array must contain only valid event types
- URL must be publicly reachable
- Private IP addresses are blocked (SSRF protection)
Returns:
- Webhook subscription details
- Secret key for HMAC-SHA256 signature verification (shown only once)
IMPORTANT: Save the secret immediately - it cannot be retrieved later.
Webhook Payload Structure: Every webhook delivery will contain these headers:
- X-Debitura-Signature: HMAC-SHA256 signature (format: t={timestamp},v1={signature})
- X-Debitura-Timestamp: Unix timestamp of the event
- X-Debitura-Event: Event type (e.g., 'case.created')
Signature Verification (HMAC-SHA256):
- Extract timestamp (t) and signature (v1) from X-Debitura-Signature header
- Construct signed payload: {timestamp}.{json_body}
- Compute HMAC-SHA256 using your webhook secret (Base64 decoded)
- Compare computed signature with v1 value (use constant-time comparison)
- Verify timestamp is within 5 minutes to prevent replay attacks
Example Payload:
{
"id": "bfa8af05-4bd1-4fd5-8f80-a6357f99dc59",
"specVersion": "1.0",
"event": "case.created",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"caseId": "72d427c1-c38c-48db-b369-6f4a2e9cad3f",
"reference": "Q8OAXF3W",
"lifecycle": "Pending Verification Internal"
},
"links": {
"self": "https://customer-api.debitura.com/Cases/72d427c1-c38c-48db-b369-6f4a2e9cad3f"
}
}
Request body
urlstringRequiredMax 800 characters · URLeventsarray of stringsRequiredisTestModeboolean
Returns
201 Webhook created successfully
iduuidurlstringnullableeventsarray of stringsnullableisActivebooleancreatedUtcdatetimeupdatedUtcdatetimedisabledReasonstringnullablesecretstringnullableisTestModeboolean
curl -X POST https://customer-api.debitura.com/webhooks \-H "XApiKey: $DEBITURA_API_KEY" \-H "Content-Type: application/json" \-d '{"url": "https://example.com/webhooks/debitura","events": ["string"]}'
{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}
Get a single webhook subscription by ID.
/webhooks/{id}Returns details of a specific webhook subscription. Secret is never returned in this operation.
Path parameters
iduuidRequired
Returns
200 Webhook subscription found
iduuidurlstringnullableeventsarray of stringsnullableisActivebooleancreatedUtcdatetimeupdatedUtcdatetimedisabledReasonstringnullablesecretstringnullableisTestModeboolean
curl https://customer-api.debitura.com/webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31 \-H "XApiKey: $DEBITURA_API_KEY"
{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}
Update an existing webhook subscription.
/webhooks/{id}Partially updates an existing webhook subscription using HTTP PATCH.
Supported Updates:
- Change the webhook URL
- Enable or disable the subscription
- Regenerate the secret key
Note: Event types cannot be changed after creation. To update event types, delete and recreate the subscription.
Path parameters
iduuidRequired
Request body
urlstringnullableMax 800 characters · URLeventsarray of stringsnullableisActivebooleannullableregenerateSecretbooleanisTestModebooleannullable
Returns
200 Webhook updated successfully
iduuidurlstringnullableeventsarray of stringsnullableisActivebooleancreatedUtcdatetimeupdatedUtcdatetimedisabledReasonstringnullablesecretstringnullableisTestModeboolean
curl -X PATCH https://customer-api.debitura.com/webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31 \-H "XApiKey: $DEBITURA_API_KEY" \-H "Content-Type: application/json" \-d '{}'
{"id": "3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31","url": "https://app.debitura.com/…","events": ["string"],"isActive": true,"createdUtc": "2026-10-01T14:05:00Z","updatedUtc": "2026-10-01T14:05:00Z","disabledReason": null,"secret": "string","isTestMode": true}
Delete a webhook subscription.
/webhooks/{id}Deletes a webhook subscription. This operation is permanent.
Path parameters
iduuidRequired
Returns
204 Webhook deleted successfully — no response body.
curl -X DELETE https://customer-api.debitura.com/webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31 \-H "XApiKey: $DEBITURA_API_KEY"
204 Webhook deleted successfully. No response body.
Send a test event to the webhook endpoint.
/webhooks/{id}/testSends a synthetic case.created test event to the webhook endpoint.
This is useful for:
- Verifying the webhook URL is reachable
- Testing your webhook endpoint implementation
- Validating signature verification
The test payload will be a realistic case.created event with synthetic data.
Path parameters
iduuidRequired
Returns
200 Test completed
successbooleanWhether the test delivery was successful.
httpStatusCodeintegernullableHTTP status code returned by the webhook endpoint.
durationMsintegernullableDuration of the HTTP request in milliseconds.
errorMessagestringnullableError message if the delivery failed.
errorCategorystringnullableCategory of the error (TimeoutError, NetworkError, SslError, HttpError, UnknownError).
testPayloadanynullableThe test event payload that was sent.
curl -X POST https://customer-api.debitura.com/webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31/test \-H "XApiKey: $DEBITURA_API_KEY"
{"success": true,"httpStatusCode": 3,"durationMs": 3,"errorMessage": null,"errorCategory": null,"testPayload": null}
Send a test event to the webhook endpoint.
/webhooks/{id}:testSends a synthetic case.created test event to the webhook endpoint.
This is useful for:
- Verifying the webhook URL is reachable
- Testing your webhook endpoint implementation
- Validating signature verification
The test payload will be a realistic case.created event with synthetic data.
Path parameters
iduuidRequired
Returns
200 Test completed
successbooleanWhether the test delivery was successful.
httpStatusCodeintegernullableHTTP status code returned by the webhook endpoint.
durationMsintegernullableDuration of the HTTP request in milliseconds.
errorMessagestringnullableError message if the delivery failed.
errorCategorystringnullableCategory of the error (TimeoutError, NetworkError, SslError, HttpError, UnknownError).
testPayloadanynullableThe test event payload that was sent.
curl -X POST https://customer-api.debitura.com/webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31:test \-H "XApiKey: $DEBITURA_API_KEY"
{"success": true,"httpStatusCode": 3,"durationMs": 3,"errorMessage": null,"errorCategory": null,"testPayload": null}
Deprecated
Kept working for existing integrations. Do not build on these.
This endpoint is misnamed and does not actually replay events. Use `GET /webhooks/events?caseId={id}` to inspect delivery history, then `POST /webhooks/events/{eventId}/replay` to re-deliver a specific event.Deprecated
/webhooks/{id}/replayThis endpoint was never fully implemented — it counts cases created
since sinceUtc and returns the count as eventsReplayed, but does not
re-enqueue or redeliver any events. The name "replay" collides with the real
POST /webhooks/events/{eventId}/replay endpoint which actually re-delivers.
This endpoint is kept for backward compatibility (additive-only rule) but is deprecated. Integrators should migrate to the event-log + replay-by-id pattern described above.
Path parameters
iduuidRequired
Request body
sinceUtcdatetimeRequiredReplay all case.created events since this timestamp (UTC).
Returns
200 Count of cases since sinceUtc (not events replayed)
eventsReplayedintegerNumber of events that were re-enqueued for delivery.
curl -X POST https://customer-api.debitura.com/webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31/replay \-H "XApiKey: $DEBITURA_API_KEY" \-H "Content-Type: application/json" \-d '{"sinceUtc": "2026-10-01T14:05:00Z"}'
{"eventsReplayed": 3}
This endpoint is misnamed and does not actually replay events. Use `GET /webhooks/events?caseId={id}` to inspect delivery history, then `POST /webhooks/events/{eventId}/replay` to re-deliver a specific event.Deprecated
/webhooks/{id}:replayThis endpoint was never fully implemented — it counts cases created
since sinceUtc and returns the count as eventsReplayed, but does not
re-enqueue or redeliver any events. The name "replay" collides with the real
POST /webhooks/events/{eventId}/replay endpoint which actually re-delivers.
This endpoint is kept for backward compatibility (additive-only rule) but is deprecated. Integrators should migrate to the event-log + replay-by-id pattern described above.
Path parameters
iduuidRequired
Request body
sinceUtcdatetimeRequiredReplay all case.created events since this timestamp (UTC).
Returns
200 Count of cases since sinceUtc (not events replayed)
eventsReplayedintegerNumber of events that were re-enqueued for delivery.
curl -X POST https://customer-api.debitura.com/webhooks/3f2b6c1e-8a4d-4b7f-9c2e-5d1a0b9e7f31:replay \-H "XApiKey: $DEBITURA_API_KEY" \-H "Content-Type: application/json" \-d '{"sinceUtc": "2026-10-01T14:05:00Z"}'
{"eventsReplayed": 3}