Webhooks API
Base path: https://gateway.useyona.com/a/v1/organizations/:orgId/webhooks
All webhook endpoints require the organization ID in the URL path.
Create webhook
POST /a/v1/organizations/:orgId/webhooks
Register a webhook endpoint to receive event notifications.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS URL to receive events |
events | string[] | Yes | Events to subscribe to |
description | string | No | Human-readable description |
The secret field is returned only in the create response. Store it securely — you need it to verify webhook signatures.
List webhooks
GET /a/v1/organizations/:orgId/webhooks
Get webhook
GET /a/v1/organizations/:orgId/webhooks/:id
Update webhook
PATCH /a/v1/organizations/:orgId/webhooks/:id
Delete webhook
DELETE /a/v1/organizations/:orgId/webhooks/:id
Test webhook
POST /a/v1/organizations/:orgId/webhooks/:id/test
Send a test event to verify your endpoint is reachable and correctly verifying signatures.
List deliveries
GET /a/v1/organizations/:orgId/webhooks/:webhookId/deliveries
Get delivery history for a webhook endpoint.
Retry delivery
POST /a/v1/organizations/:orgId/webhooks/deliveries/:deliveryId/retry
Retry a failed webhook delivery.
Webhook payload shape
Every webhook delivery sends this JSON structure:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "invoice.approved",
"environment": "sandbox",
"timestamp": "2026-04-30T11:10:05.000Z",
"data": {
"invoiceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"invoiceNumber": "INV-2026-001",
"status": "accepted",
"jurisdiction": "NG",
"authorityReference": "NRS-REF-001",
"submittedAt": "2026-04-30T11:10:05.000Z"
}
}Signature verification
Every delivery includes an HMAC-SHA256 signature in the X-Webhook-Signature header. See Core Concepts — Webhooks for verification implementation.
Retry logic
- 3 total attempts (1 initial + 2 retries) with exponential backoff
- Success = HTTP 2xx response
- Timeout = 10 seconds per attempt