A complete reference of every webhook event UniLink can send — what triggers each one, what the payload looks like, and how to subscribe selectively.
- UniLink fires webhook events across five categories: page views, contacts, orders, forms, and subscriptions.
- Every payload shares a common envelope with
id,event,created_at, and adataobject specific to the event type. - You can subscribe each endpoint to all events or filter to specific types to reduce processing load.
UniLink webhooks cover every meaningful action a visitor or customer can take on your pages — from simply viewing a page to completing a purchase to cancelling a subscription. Knowing exactly which event to subscribe to and what data each payload contains is the key to building integrations that respond precisely to what matters to your business. This reference covers all available event types, their trigger conditions, and the structure of their payloads.
What Webhook Events Does
Every webhook payload from UniLink shares a common outer envelope structure. The id field is a globally unique identifier for this specific delivery — use it for idempotency checks. The event field is a dot-notated string identifying the event type (for example, order.created). The created_at field is an ISO 8601 UTC timestamp of when the event occurred. The data object contains the full resource that triggered the event — its fields vary per event type but always include the resource's id and the most relevant attributes.
Events are organized into categories that reflect the resource they describe. Page events (page.viewed) fire on visitor activity. Contact events (contact.created, contact.updated) fire when visitors opt in through your forms or when contact records change. Order events (order.created, order.completed, order.refunded) cover the full purchase lifecycle. Form events (form.submitted) fire for any form submission that is not a contact opt-in. Subscription events (subscription.created, subscription.cancelled) and payment events (payment.failed) cover recurring billing lifecycle moments.
When you register a webhook endpoint in the dashboard, you choose which event types it subscribes to. You can subscribe a single endpoint to all events (convenient for logging or general-purpose handlers) or restrict it to specific types (more efficient for purpose-built integrations). You can also register multiple endpoints and route different event categories to different services — for example, sending all order events to your fulfillment service endpoint and all contact events to your CRM endpoint.
How to Get Started
- Go to Settings → Webhooks → Add Endpoint in the dashboard. Enter your endpoint URL and expand the event type selector.
- Choose the specific events relevant to your use case. If you are building a fulfillment integration, select
order.createdandorder.completed. If you are building a CRM sync, selectcontact.createdandcontact.updated. - Save the endpoint and copy the signing secret. You need this secret to verify that incoming payloads are genuinely from UniLink.
- In your handler, read the
eventfield from the JSON body first and route to the appropriate processing function based on its value. - Log the full payload during development. Store the raw JSON alongside the event type and timestamp so you can inspect real payloads and refine your handler logic without needing to retrigger events manually.
How to Use Webhook Event Types
- page.viewed: Fires every time a visitor loads your UniLink page. The
dataobject includespage_id,url,referrer,user_agent, andcountry. Use this for custom analytics pipelines or real-time visitor tracking dashboards. - contact.created / contact.updated: Fires when a new contact opts in or an existing contact's record changes. The
dataobject includescontact_id,email,name,phone,tags, andcustom_fields. Use this to sync contacts to your email platform or CRM in real time. - order.created / order.completed / order.refunded: Covers the full order lifecycle.
order.createdfires at checkout;order.completedfires when payment is confirmed;order.refundedfires when a refund is issued. Thedataobject includesorder_id,amount,currency,items,customer, andstatus. - form.submitted: Fires when a visitor submits any form on your page (excluding contact opt-in forms, which trigger
contact.createdinstead). Thedataobject includesform_id,page_id, and afieldsobject containing submitted field names and values. - subscription.created / subscription.cancelled / payment.failed: Covers recurring subscription lifecycle.
subscription.createdfires when a plan is purchased;subscription.cancelledfires on cancellation;payment.failedfires when a renewal charge fails. Thedataobject includessubscription_id,plan_id,customer, andnext_billing_date.
Key Settings
| Setting | What It Does | Recommended |
|---|---|---|
| Event Filtering Per Endpoint | Restricts which event types are delivered to a specific endpoint | Subscribe only to events your handler uses — reduces payload volume |
| page.viewed Frequency | Can generate high volume on popular pages | Use a queue and async processing — do not process synchronously in the request handler |
| order.* Events | Cover the full purchase lifecycle | Always verify signatures on financial events before acting on them |
| payment.failed Handling | Fires when subscription renewal charge fails | Use to trigger dunning emails or access restriction logic in your app |
| contact.updated Frequency | Fires on any field change — can be noisy | Check which fields changed using the changes key in the payload before processing |
page.viewed can generate thousands of webhook deliveries per day. If you only need aggregated analytics, consider batching these events server-side or using UniLink's built-in analytics API instead of processing every individual view event via webhook.
Get the Most Out Of Webhook Events
Build a central event log as your first webhook handler. Before writing business logic, create an endpoint that simply stores every incoming event payload in a database table with columns for id, event, created_at, and the raw JSON body. This log becomes your audit trail, your debugging tool, and the data source from which you can derive any business logic later without having to re-subscribe to historical events.
Use contact.created and contact.updated together to maintain a real-time mirror of your UniLink contact database in your own system. On contact.created, insert the record. On contact.updated, upsert it using the contact's id as the key. The contact.updated payload includes a changes map showing which fields changed — use it to avoid overwriting fields your system has updated independently.
Handle payment.failed events with a dunning workflow. When a subscription renewal fails, you typically want to notify the customer, retry the payment after a few days, and eventually downgrade access if retries continue to fail. The payment.failed event gives you the subscription_id, the customer email, and the number of retry_count — enough context to determine what stage of the dunning sequence to trigger.
Test all event types before going to production by using the "Send Test Event" button in Settings → Webhooks → [Endpoint] → Test. UniLink sends a synthetic payload for any event type you choose. This lets you validate your handler logic for events that are rare in production (like order.refunded) without needing to actually perform a refund during development.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| Expected event not arriving | Event type not included in endpoint subscription | Edit the endpoint in Settings → Webhooks and add the missing event type to the subscription list |
| Handler receives unknown event types | Endpoint subscribed to all events but handler only expects some | Add a default case to your event router that logs and ignores unrecognized event types gracefully |
| order.completed not firing after payment | Payment is processing asynchronously — order.created fires first | Wait for order.completed before fulfilling digital goods — this event confirms payment success |
| Duplicate contact records in CRM | Receiving contact.created multiple times due to retries | Use the contact_id from the payload as a unique key and upsert rather than insert on this event |
- Comprehensive coverage of all meaningful user actions across pages, contacts, orders, and subscriptions
- Consistent envelope structure across all event types makes handler code predictable
- Per-endpoint event filtering reduces noise and processing overhead
- Test event functionality lets you validate handlers for rare events without real transactions
- page.viewed events can generate very high delivery volume on popular pages
- No historical event replay beyond 72 hours — missed deliveries older than that are unrecoverable
- contact.updated fires on any field change — requires change-detection logic to avoid unnecessary processing
What is the difference between order.created and order.completed?
order.created fires when a checkout is initiated. order.completed fires after payment is confirmed. For digital goods fulfillment, always wait for order.completed — order.created alone does not guarantee payment success.
Does form.submitted fire for contact opt-in forms?
No. Contact opt-in form submissions fire contact.created instead. form.submitted covers other custom forms on your page — feedback forms, survey forms, registration forms, and similar.
Can I subscribe to all events at once?
Yes. When adding a webhook endpoint, select "All events" in the event subscription list. UniLink will deliver every event type to your endpoint. Be prepared to handle high volume if your pages have significant traffic.
How do I tell which fields changed in a contact.updated event?
The contact.updated payload includes a changes object that maps field names to their previous and new values: {"email": {"from": "[email protected]", "to": "[email protected]"}}. Check this before deciding whether to sync to downstream systems.
Are webhook events available on the Free plan?
Basic webhook support (up to 2 endpoints, contact and order events) is available on the Free plan. Full event coverage including page.viewed and subscription events requires a Pro or Business plan.
- UniLink fires 10 event types across page, contact, order, form, subscription, and payment categories.
- Every payload has a common envelope:
id,event,created_at, and event-specificdata. - Use
order.completed(notorder.created) to confirm payment before fulfilling orders. - Filter events per endpoint to subscribe only to types your handler actually processes.
- Use the "Send Test Event" button in the dashboard to validate handlers for rare event types before going live.
Start receiving real-time events from your UniLink pages — set up your webhook endpoints at app.unilink.us under Settings → Webhooks.
