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:Buyer, order and cart fields
order/paid and checkout/abandonedCart carry what you need to contact the buyer and see what they bought or left, with no follow-up API call. Amounts are in minor units (cents).
data.customer:id,email,firstName,lastName,phone,locale,acceptsMarketing,tags.phoneis the first number the buyer typed: on this checkout or order first, then on an earlier purchase. It isnullwhen the buyer never gave one.data.order(order/paidonly):status,orderNumber,currency,paidAmount,paidAt,createdAt,checkoutSessionId,billingAddress,shippingAddress,requiresShipping,externalOrderId, and the totals:subtotalAmount,totalPromotionAmount(the discount, positive),totalTaxAmount,shippingCost,totalAmount(before discounts) andtotalAdjustedAmount(what the buyer is charged). An address the buyer never filled in comes with every key set to an empty string, as in thepayment/*events.data.lineItems(checkout/abandonedCart, same shape asorder/paid):productId,productName,variantId,variantName,sku,unitAmount,quantityfor each product left in the cart.data.checkout(checkout/abandonedCartonly):status,currency, the same totals asdata.order,billingAddressandshippingAddress(nulluntil the buyer typed one),createdAt, andlastActiveAt, the buyer’s last action on the checkout.
checkout/abandonedCart delivery looks like this:
checkoutUrl reopens the buyer’s checkout with their cart: it is the link of the abandoned-cart e-mail.
Use 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 6 attempts per event over about 1 h 15 (about 1 h 25 when your endpoint answers HTTP 409). The first attempt fires immediately when the event is emitted; later attempts use smart backoff based on the failure type: timeouts,5xx, 408 and 429 retry quickly; HTTP 409 / Woo sync lag waits longer.
Retries are picked up by a job that runs every minute, so each retry can arrive up to about one minute later than the delay above.
Permanent client errors (
401, 404, 400, 403) stop retrying immediately — they will not consume later attempts. After attempt 6 fails, the delivery moves to a dead-letter state. You can replay it manually from the CRM once the endpoint is fixed.
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
Pages are numbered from 0:page: 0 is the first page and the last one is totalPages - 1. Starting at
page: 1 silently skips the first pageSize events.
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.
Use
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
