Skip to main content
A webhook is an HTTP request Ionic sends to a URL you control when something happens in your account — a payment succeeds, a refund settles, a subscription changes. Instead of polling the API, you register an endpoint once and Ionic delivers each event as it occurs. Use webhooks for work that happens after payment: fulfill an order, send a receipt, provision access, or update your records. A redirect only tells you that the buyer returned to your site. Confirm payment from a verified webhook or an API response before fulfilling the order.

How it works

1

Register an endpoint

Tell Ionic which URL to deliver to with POST /v1/webhook_endpoints. You receive a signing secret once, at creation time.
2

Receive events

Ionic sends each event as a POST with a JSON envelope in the body. Respond 2xx quickly to acknowledge receipt.
3

Verify and act

Verify the signature on every request, then act on the event — idempotently, because the same event can arrive more than once.

Delivery semantics

Read these guarantees carefully — they determine how you must write your handler.
Return 2xx only once you’ve durably accepted the event (for example, written it to a queue or table). Returning 2xx before you’ve stored it means a crash loses the event — Ionic considers a 2xx an acknowledgment and won’t retry.

Test mode and live mode

Every event carries a livemode flag. Events generated by test API keys (sk_v1_test_…) have "livemode": false; events from live keys have "livemode": true. Endpoints are scoped to one mode — a test-mode endpoint only receives test-mode events. Build and verify your integration entirely in test mode before going live.

The envelope at a glance

Every delivery has the same outer shape. The event-specific data lives under data.object, which is the full resource snapshot — byte-for-byte the same shape the API returns from GET /v1/<resource>/{id}.
See the envelope reference for every field, and the event catalog for a verified example of each event type.

Next steps

Quickstart

Register an endpoint and verify your first event in about five minutes.

Verify signatures

Confirm every delivery really came from Ionic. Do this before trusting any event.

Event catalog

All 23 event types, when each fires, and a verified payload for each.

Idempotency & retries

Handle duplicates and out-of-order delivery correctly.