Available Endpoints
Webhook Object
TheWebhook model represents a webhook configuration registered by a business.
It defines where event notifications are sent, which events are delivered, and how those events are secured.
Webhooks enable near-real-time communication between OraFi and your backend systems.
Fields
id
- Type:
String - Primary Key
- Default:
cuid() - Database Field:
_id - Description: Unique identifier for the webhook configuration.
url
- Type:
String - Required
- Description: Publicly accessible HTTPS endpoint where webhook events will be delivered.
secret
- Type:
String - Required
- Description: Shared secret used to sign webhook payloads. This allows your server to verify that incoming webhooks originated from OraFi.
events
- Type:
String[] - Description: List of event types the webhook is subscribed to. Only events listed here will be delivered to the configured URL.
createdAt
- Type:
DateTime - Default:
now() - Description: Timestamp indicating when the webhook was created.
updatedAt
- Type:
DateTime - Default:
now() - Description: Timestamp indicating the last time the webhook configuration was updated.
profileId
- Type:
String - Unique
- Description: Identifier of the business profile that owns this webhook configuration. Each business profile can have only one active webhook.
Relationships (High-Level)
- Business Profile Each webhook belongs to exactly one business profile.
- Webhook Deliveries A webhook can generate multiple delivery attempts, each tracked for reliability and retry handling.
Notes
- Webhook deliveries are asynchronous and retried on failure.
- Payloads are signed using the configured
secretand should always be verified on receipt. - Updating the webhook replaces the previous configuration for the business profile.
Get Webhook Details
Retrieve webhook configuration.
Get webhook event types
Retrieve various webhook events available.
Register Webhook
Set up a webhook endpoint.
Request Body
url
- Type:
url - Required
- Description:
Publicly accessible endpoint to receive webhooks
Subscribe to Events
Subscribe to a webhook event
Request Body
event
- Type:
string - Required
- Description:
Webhook event to be subscribed.
