Skip to main content

Overview

Webhooks notify your application in real time when events happen on the YoID platform — a youth accepts a credential, a verification is completed, or a request expires. This eliminates the need to poll the API for status updates.
Webhooks are the recommended approach for production integrations. In the YOMA ecosystem, a youth may take minutes or days to respond to a verification request. Polling creates unnecessary load and doesn’t scale. Use webhooks as the primary pattern, and polling only as a fallback during development.

Supported Events

Registering a Webhook Endpoint

Request Body

Available filter types:
Use filterTypes to reduce noise — an issuer that doesn’t verify credentials doesn’t need presentation events.

Response (201 Created)

Listing Webhook Endpoints

Returns an array of all registered webhook endpoints for your organisation.

Removing a Webhook Endpoint

Returns 204 No Content on success.

Webhook Payload Structure

All payloads include an eventType and a payload with a resource reference:
Use the resource ID to fetch the full details from the relevant API endpoint.

Technical Requirements

Your webhook endpoint must:
  • Accept POST requests
  • Use HTTPS exclusively
  • Respond promptly with a 2xx status code
  • Handle duplicate deliveries — the platform may retry on failure
  • Be idempotent — processing the same event twice should produce the same result

Implementation Example

A production-ready webhook handler for a learning partner tracking credential acceptance:

Use Cases in the YOMA Ecosystem

Local Development

Use ngrok to expose your local server via a public HTTPS URL during development:
Register the resulting https:// ngrok URL as your webhook endpoint. The platform retries failed deliveries automatically.
For production, consider a webhook ingestion service (like Svix or AWS EventBridge) that handles retries, logging, and replay — especially if your backend may be temporarily unavailable.