Before you start: You need an HTTPS endpoint that Nickel can reach. For sandbox testing, a webhook.site inbox or an ngrok tunnel to your laptop works great.
Register your endpoint
Create the subscription with Store the
POST /webhook:secret alongside your API key — Nickel signs every delivery to this webhook with it, and your receiver uses it to tell real deliveries from forgeries in the next step.Confirm the subscription
GET /webhook shows what’s registered — after the call above, exactly one entry (you can also re-read the secret here if you lose it):"secret": null means the subscription predates webhook signing and its deliveries are unsigned — recreate it with POST /webhook to get a secret.Handle deliveries
Every event arrives as a Your receiver only needs to do five things — verify the signature, acknowledge fast, process later, deduplicate, and tolerate categories it doesn’t know:The
POST with the same thin envelope. Here’s a real delivery:verifyNickelSignature implementation — an HMAC-SHA256 over the timestamp and raw request body (capture it before your framework parses the JSON) — is in Verifying Signatures.Nickel retries failed deliveries with exponential backoff for up to 5 attempts, so slow handlers cause duplicate deliveries — do real work on a queue, not in the request.Fetch the real state
The event doesn’t carry amounts or statuses — it tells you what to look at. Map
Always act on the fetched object, not the event name alone. For example,
associated_object_type to the matching GET endpoint:associated_object_type | Fetch with |
|---|---|
payment | GET /payment/{id} |
disbursement | GET /disbursement/{id} |
charge_authorization | GET /chargeAuthorization/{id} |
bill_payment | GET /billPayment/{id} |
vendor | GET /vendor/{id} |
check | GET /billPayment/{id} — check events carry the bill payment’s ID |
payment.made for a bank (ACH) payment fires when the debit is initiated — the fetched payment will show status: "PENDING", not SUCCEEDED, until the funds actually arrive.Test the loop in the sandbox
- Point your sandbox subscription at a webhook.site inbox (or your ngrok tunnel).
- Trigger events with your sandbox key: create and pay an invoice, or create a charge authorization — each fires its event within seconds.
- Watch the deliveries arrive, then swap in your real endpoint and re-register.
Where to go next
Webhook events
The full event catalog, delivery retries, and signature verification.
Send an invoice and get paid
The flow that fires payment.made.
