Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Webhooks

Receive real-time event notifications when payment, invoice, transaction, payout, refund, swap, and deposit states change.

Use webhooks to keep your system in sync without polling.

Webhook references

Choose a page for the event family you need:

Reference

Payments

Description

Payment session lifecycle events.

Reference

Invoices

Description

Invoice payment, updates, and expiry.

Reference

Transactions

Description

On-chain transaction detection and confirmation.

Reference

Payouts

Description

Outgoing payout events.

Reference

Refunds

Description

Refund creation, completion, and failure.

Reference

Swaps

Description

Currency swaps between your balances.

Reference

Deposits

Description

Crypto and bank transfer deposits into your account.

Before you go live

  • Verify the webhook signature on every request.

  • Return a 200 response as soon as you accept the event.

  • Use X-CoinCircuit-Delivery-Id to handle retries safely.

Process webhook deliveries asynchronously when possible.

Store the delivery ID and ignore duplicates.

Event flow

Most payment flows follow this order:

  1. transaction.received

  2. transaction.confirmed

  3. One of the payment events

  4. Any follow-up invoice, payout, or refund events

Use transaction events for blockchain state.

Use payment and invoice events for business state.

Delivery format

All webhook deliveries are sent as POST requests to your webhook endpoint.

Standard headers

Header
Description

X-CoinCircuit-Event

Event name, such as transaction.confirmed.

X-CoinCircuit-Delivery-Id

Unique ID for this delivery.

X-CoinCircuit-Signature

HMAC-SHA256 signature of the request body.

X-CoinCircuit-Timestamp

Unix timestamp of the delivery, used in signing.

Retry behavior

If your endpoint returns anything other than a 200, the delivery is retried with exponential backoff, roughly at 0 minutes, 1 minute, 10 minutes, then 1 hour.

Build handlers to be idempotent.

Use the delivery ID to detect duplicates safely.

Verify signatures

Verify signatures against the raw request body.

Reject invalid requests before you process the payload.

Shared payload shape

Every delivery includes:

  • event: the event name

  • data: the event payload

The object inside data changes by event family:

  • payment events use data.session

  • invoice events use data.invoice and data.payments

  • transaction events use data.transaction and data.session

  • payout events use data.payout

  • refund events use data.refund

  • swap events use data.swap

  • deposit events put the deposit directly in data

Last updated