Skip to main content
Instead of polling Get Transactions, let cNGN notify your server the moment a transaction changes state. Webhooks are how your systems learn that a customer’s deposit landed, a redemption paid out, or a withdrawal failed.
Webhook URLs, event subscriptions, and the signing secret are managed in your merchant dashboard, not through the third-party API. Each environment has its own webhook URL: one for test and one for live.

Setting up

1

Add your webhook URL

In the dashboard security settings, set the HTTPS endpoint that should receive events. Configure the test URL first and verify your handler against test transactions before setting the live URL.
2

Set a signing secret

Add a signing secret in the dashboard. cNGN uses it to sign every delivery so your server can verify the event genuinely came from cNGN. Without a secret configured, deliveries arrive unsigned.
3

Subscribe to events

Choose which of the five event types (below) your endpoint should receive. Subscribe only to what you act on; you can change subscriptions at any time.
4

Verify and respond fast

Validate the signature, queue the event for processing, and return a 2xx immediately. Do the heavy work asynchronously.

Event types

deposit.received followed by deposit.completed is the normal lifecycle of a fiat deposit. Credit your customer only on deposit.completed.

Delivery payload

Every delivery is an HTTPS POST with the same JSON envelope:
string
One of the five event types above.
object
The transaction snapshot at the moment of the state change. Common fields:
string
ISO 8601 time the webhook was dispatched.

Sample payloads per event

Fires when a fiat payment lands in your virtual account and is awaiting mint approval. No on-chain step has happened yet, so there is no network or hash, the asset_symbol is NGN, and receiver is your business ID:
Funds are confirmed received but cNGN has not been credited yet. Do not credit your customer on this event; wait for deposit.completed.

Field presence by event

Verifying the signature

When a signing secret is configured, every delivery carries this header:
The digest is an HMAC-SHA256 of the raw JSON request body, keyed with your signing secret. Recompute it and compare before trusting the event:

Delivery behaviour and best practices

Deliveries are sent once, with a 10-second timeout, and are not automatically retried. Design your handler accordingly:
If your endpoint is down when an event fires, that delivery is missed. Reconcile periodically against Get Transactions or Verify Withdrawal so a missed webhook never means missed money.
The dispatcher times out after 10 seconds. Persist the event to a queue and return 200 immediately; never do bank calls or blockchain lookups inline.
Key your processing on data.transactionId plus event. If you’ve already processed that pair, acknowledge and skip.
Anyone who discovers your endpoint URL can POST fake events to it. Reject anything whose X-cNGN-Signature doesn’t validate, and keep the signing secret out of source control.

Bridge completion callback

Separately from event webhooks, Bridge accepts an optional per-request callbackUrl. When the bridged cNGN is minted on the destination network, cNGN POSTs a one-time notification to that URL:
This callback is not signed and times out after 4.5 seconds, so treat it purely as a hint to check state; confirm via Get Transactions before crediting anything.