Webhook endpoints receive HTTP POST notifications from Borga when events occur in your account — for example, when a payment succeeds or a subscription is canceled. Register an endpoint with a list of event types to subscribe to, and Borga will deliver a signed payload to your URL each time a matching event occurs.Documentation Index
Fetch the complete documentation index at: https://docs.borga.is/llms.txt
Use this file to discover all available pages before exploring further.
Every delivery is signed using your endpoint’s
secret. Verify the Borga-Signature header on each incoming request by computing an HMAC-SHA256 of the raw request body using the signing secret. Reject any request that does not match.| Event | Description |
|---|---|
payment.succeeded | A payment was collected successfully. |
payment.failed | A payment attempt failed. |
invoice.paid | An invoice was paid in full. |
subscription.created | A new subscription was created. |
subscription.canceled | A subscription was canceled. |
Create a webhook endpoint
POST /v1/webhook_endpoints
Registers a new webhook endpoint.
Request parameters
The HTTPS URL to which Borga will send event payloads.
Array of event type strings to subscribe to (e.g.
["payment.succeeded", "invoice.paid"]). Pass ["*"] to subscribe to all events.Whether the endpoint should receive deliveries. Defaults to
true.Response fields
Unique endpoint identifier.
The registered HTTPS URL.
Array of subscribed event types.
Whether the endpoint is currently active.
Signing secret for verifying delivery payloads. This value is only returned at creation — store it securely.
ISO 8601 timestamp of when the endpoint was created.
List webhook endpoints
GET /v1/webhook_endpoints
Returns a list of all registered webhook endpoints.
Response fields
Array of webhook endpoint objects.
Retrieve a webhook endpoint
GET /v1/webhook_endpoints/{id}
Retrieves an existing webhook endpoint. The secret is not returned after initial creation.
Path parameters
The ID of the endpoint to retrieve.
Response fields
Unique endpoint identifier.
The registered HTTPS URL.
Array of subscribed event types.
Whether the endpoint is active.
ISO 8601 timestamp of when the endpoint was created.
Update a webhook endpoint
PATCH /v1/webhook_endpoints/{id}
Updates an existing webhook endpoint. Only the fields you provide are changed.
Path parameters
The ID of the endpoint to update.
Request parameters
Updated HTTPS URL.
Updated array of event types. Replaces the existing list entirely.
Set to
false to pause deliveries to this endpoint.Response fields
Returns the updated endpoint object. See retrieve a webhook endpoint for the full field reference.Delete a webhook endpoint
DELETE /v1/webhook_endpoints/{id}
Permanently deletes a webhook endpoint. Borga will stop delivering events to this URL immediately.
Path parameters
The ID of the endpoint to delete.
Response fields
Returns an empty body with a204 No Content status on success.
List webhook deliveries
GET /v1/webhook_deliveries
Returns a paginated list of delivery attempts for a webhook endpoint, ordered by creation date descending. Use this to audit which events were received and identify failures.
Query parameters
Filter by endpoint ID.
Maximum number of deliveries to return per page.
Response fields
Array of delivery objects.
Whether more deliveries exist beyond this page.
Retry a webhook delivery
POST /v1/webhook_deliveries/{id}/retry
Retries a previously failed delivery. Borga re-sends the original event payload to the registered endpoint URL.
Path parameters
The ID of the delivery to retry.
Response fields
Returns the new delivery attempt object.Unique identifier for this retry delivery attempt.
ID of the webhook endpoint.
The event type that was retried.
Delivery status of the retry attempt.
HTTP status code returned by your endpoint.
ISO 8601 timestamp of the retry attempt.