Webhooks & Events
Time: ~10 minutes | Difficulty: Beginner Use the TagadaPay Node SDK to register HTTPS endpoints for real-time notifications, verify deliveries cryptographically, and query the event log for debugging and analytics.What webhooks are (and why use them)
Webhooks are HTTP callbacks TagadaPay sends to your server when something happens on the platform — for example, a successful payment or a subscription change. Your endpoint receives a JSON payload so you can update your database, trigger fulfillment, notify internal tools, or sync with Zapier/n8n without polling the API.Webhooks run asynchronously after the triggering action. Design your handler to respond quickly (e.g. validate the signature, enqueue work, return
2xx). Heavy work should happen in a background job.Create a webhook
Register a URL and the event types you care about. The API returns the endpoint id, URL, signing secret, subscribed types, and whether the endpoint is enabled.The signing secret
Each webhook endpoint has a unique secret. TagadaPay uses it to compute an HMAC-SHA256 signature over the raw JSON body of each delivery. Your server must verify that signature before trusting the payload.Event type strings in
eventTypes must exactly match the names listed below (slash format like order/paid). The SDK validates event types at build time via TypeScript and at runtime — passing an invalid type will throw an error immediately.Payload envelope
Every delivery is a JSON object with the same top-level shape:id as the deduplication key (see Delivery contract below). Use type to route the handler. The exact contents of data depend on the event type — inspect a real delivery in the Delivery history view of the CRM to see what your subscriptions actually receive.
Delivery contract
TagadaPayPOSTs each event to your endpoint with a strict, bounded delivery contract. Design your handler to fit inside it.
Timeout
10 seconds per attempt. If your endpoint has not returned a response within 10 seconds, TagadaPay aborts the connection and treats the attempt as failed. The abort does not cancel any work already running on your side, so an aborted attempt that keeps processing can end up finishing twice — one on the aborted call, one on the retry. Handlers must be idempotent (see below).Retry schedule
Up to 3 attempts per event. All three attempts, if they all time out, complete within roughly 34 seconds end-to-end:
Every non-2xx response counts as a failure, including 4xx. There is no per-status discrimination today — a
400 you know will never heal still consumes attempts 2 and 3. After attempt 3 fails, TagadaPay stops retrying that event.
Ack fast, process async
Return a 2xx (typically200) as soon as possible after verifying the signature — ideally within 2 seconds. Do the actual work (fulfilment, database writes, calls to Shopify, e-mails) in a background job. If your handler takes longer than 10 seconds because it processes synchronously, every attempt for that event will time out, be retried, and you will run the same work up to three times in parallel.
Idempotency (dedupe by event.id)
The same event can reach you more than once — an aborted attempt that kept processing, an attempt-2 landing while attempt-1 completes late, or a manual replay from the CRM. Use the top-level id as your deduplication key: record each id you have processed and short-circuit if you see it again. Two deliveries with the same id describe the same event and must produce the same side effect only once.
Auto-disable of dead endpoints
An endpoint that goes 3 continuous days without a single successful delivery is disabled automatically, so a URL that has stopped answering does not silently consume your allowance. A badge shows the auto-disabled state in the CRM, and one click re-enables it once you have fixed the endpoint.List webhooks
Delete a webhook
Available event types
All webhook event types use the slash format (category/event). These are the only valid values accepted by the eventTypes field.
Order events
Checkout events
Payment events
Subscription events
Funnel events
Club events
Security events
Events API (query & analytics)
Use the Events resource to audit activity, build dashboards, or debug webhook payloads.Recent events
Statistics
List with filters and pagination
appEvents.createdAt / appEvents.processedAt, customer.email, appEvents.draft, and free-text search.
Webhook subscriptions use slash-format names like
order/paid and subscription/created. The Events list API may return internal eventType strings (for example s_order_paid) — these are for internal analytics and should not be used when creating webhooks.Webhook signature verification (HMAC-SHA256)
TagadaPay signs the exact JSON string sent as the request body.- Read the raw body as a string (do not parse JSON before verifying).
- Compute
HMAC-SHA256(secret, rawBody)and hex-encode the digest. - Compare to the
X-TagadaPay-Signatureheader value after thesha256=prefix.
You can use
X-TagadaPay-Timestamp for optional replay protection and X-TagadaPay-Delivery-Attempt to log or alert on retries.
Delivery history
Every delivery attempt is recorded — the exact payload sent, the headers, the HTTP status returned, the response body, the outcome — and stays available for audit and debugging. Open it in the CRM under Integrations → Webhooks → Deliveries (per endpoint). Each row is one attempt: successful attempts appear with the response code, failed ones with the error, and a timed-out attempt shows theNo response badge.
When something looks wrong — an event you expected did not fire, a
4xx your endpoint should have accepted — the Deliveries view is the source of truth. It shows exactly what left our side and what your endpoint answered, byte for byte.SDK methods reference
Next steps
Node SDK Quick Start
Install the SDK, authenticate, and explore core resources
Sandbox Testing
Exercise payments and webhook-style flows without live processors
Merchant Quick Start
End-to-end store, funnel, and checkout setup
Subscriptions
Recurring billing and subscription lifecycle
