Skip to main content

Webhooks

TagadaPay pushes processing events to your HTTPS endpoint as they happen: a charge fails, a payout lands, a dispute opens. One partner-level endpoint receives events for all your TPAs — the account field on every event tells you which merchant it belongs to (Stripe Connect semantics). Direct merchants subscribe per-TPA the same way. Requires @tagadapay/node-sdk ≥ 3.8.0.

1. Create an endpoint

With a partner key the endpoint is created at partner scope automatically (events for all your TPAs). With a TPA-pinned merchant key it is scoped to that TPA. enabledEvents accepts exact types (payout.paid), prefixes (payout.*), or '*' for everything. Manage endpoints with list(), retrieve(id), update(id, { url, enabledEvents, status }) and del(id). Set status: 'disabled' to pause deliveries instantly.

2. Verify and handle events

Every delivery is signed with your endpoint’s whsec_… secret (header tagadapay-signature, Stripe-style t=<unix>,v1=<hmac>). Use the SDK helper — it verifies and parses in one call, and throws on a bad signature:
The event envelope:
Event ids are deterministic — if a payment processor redelivers the same underlying webhook to us, you will not receive it twice. Still design handlers to be idempotent on event.id.

Event types

charge.* payloads include a card block with PSP-agnostic BIN intelligence (funding credit/debit, segment consumer/business/commercial/government, isCommercial, prepaid, issuer country/name/currency, card product) resolved from Tagada’s own enrichment data — ready for commercial-card surcharging and risk rules without any acquirer-specific configuration. See Card intelligence.

Retries

A delivery that doesn’t get a 2xx within 10 seconds is retried with backoff 1 min → 10 min → 1 h → 6 h → 24 h (6 attempts total), then marked failed. Failures never block other events.

3. Delivery log & replay

Audit exactly what was sent, when, and what your server answered:
Replays create a fresh delivery (the historical row is preserved) with the exact original payload — same event.id, so idempotent consumers stay safe.

Testing your integration

Point a temporary endpoint at a request inspector (e.g. https://webhook.site/…), subscribe to '*', then trigger a test event — the fastest is an on-demand payout or a small refund on a test TPA. Check the delivery log to confirm the 200.