Register and verify your endpoint
- In the dashboard, go to Integration Kit → Webhooks and register your
HTTPS endpoint URL for the environment (
TESTorLIVE). - Click Verify: SwitchFlow sends a signed test event and expects a
2xxresponse. Go-live is blocked until the live endpoint verifies.
Event types
| Type | When |
|---|---|
payment.succeeded | A gateway captured the payment (possibly after failover) |
payment.declined | Terminal decline — no gateway approved |
payment.failed | No capture for another reason; data.reason explains (e.g. gateway_blackout) |
payment.refunded | A refund was processed on the capturing gateway |
Verify signatures
Every delivery is signed (HMAC-SHA256) via theSwitchFlow-Signature header.
Always verify before trusting a payload — the five-line implementation is
in Verifying signatures.
Delivery and retries
- Respond
2xxquickly (do heavy work asynchronously). Anything else counts as a failed delivery. - On
5xxor timeout, SwitchFlow retries with exponential backoff — roughly 5 min, 15 min, 45 min, 2 h, 6 h — up to 5 attempts. - A
4xxresponse is treated as terminal (your endpoint rejected the event) — no retry storm; the delivery is flagged in the dashboard. - After retries are exhausted the delivery is marked FAILED, you are notified by email, and the event remains visible — and manually re-deliverable — in the dashboard’s webhook log.
- Duplicate gateway events are deduplicated upstream by idempotency key: you
receive exactly one event per payment outcome. Still, treat
SwitchFlow-Event-Idas an idempotency key on your side — a retry after a timeout can mean you process the same event twice.