a signed HTTPS POST per finalized transaction
Each finalized transaction touching a listed address arrives at your HTTPS url as a signed POST. Dev, Business and Pro plans only. A delivered event or test costs 1 credit; failed tries and management calls are free. Caps: rate limits. Manage webhooks on the dashboard's Webhooks tab (DELIVERIES: log and test) or the API at carbium.sh with the dashboard session, Authorization: Bearer <session token> as in account and billing, or an account API key; a service key is refused.
quick start
# 1 create: the dashboard's API, with the session token or an account API key (never a service key)curl -s https://carbium.sh/v1/webhooks -H 'Authorization: Bearer <session token>' \ -H 'Content-Type: application/json' \ -d '{"key_id":<your key_id>,"url":"https://example.com/hook","addresses":["<base58 address>"]}'# -> {"webhook":{"webhook_id":7,"status":"active",...},"secret":"whsec_..."}# the secret is shown once: store it. No 2xx within 15 s: 8 tries over about 27 hours.# 2 test, once parts 3 and 4 answer on your url: one signed event with slot 0 and "test": true, tried oncecurl -s -X POST https://carbium.sh/v1/webhooks/7/test -H 'Authorization: Bearer <session token>'# -> {"event_id":"evt_test_...","outcome":"delivered","http_status":200,"reason":"","latency_ms":102,...}// 3 receive (node, no package; save parts 3 and 4 as receive.mjs): keep the RAW body, answer 200 at once, work afterimport { createServer } from "node:http";createServer((req, res) => { const parts = []; req.on("data", (c) => parts.push(c)).on("end", () => { const raw = Buffer.concat(parts); if (!verify(process.env.WHSEC, req.headers, raw)) return res.writeHead(401).end(); res.writeHead(200).end(); for (const tx of JSON.parse(raw)) console.log(tx.test ? "test" : tx.slot, tx.transaction?.signatures[0] ?? tx.signature); });}).listen(8080); // behind your https name on 443// 4 verify: HMAC-SHA256 of id.timestamp.body under the secret's bytesimport { createHmac, timingSafeEqual } from "node:crypto";function verify(secret, h, raw) { if (!secret) return false; const id = h["webhook-id"], ts = h["webhook-timestamp"]; if (!id || !(Math.abs(Date.now() / 1000 - Number(ts)) <= 300)) return false; // 5 minutes const key = Buffer.from(secret.slice("whsec_".length), "base64"); const want = Buffer.from("v1," + createHmac("sha256", key).update(id + "." + ts + ".").update(raw).digest("base64")); return String(h["webhook-signature"] || "").split(" ").some((s) => { const got = Buffer.from(s); return got.length === want.length && timingSafeEqual(got, want); });}
routes
| route | body | answer |
|---|---|---|
| GET /v1/webhooks | none | your webhooks, oldest first, no address lists |
| POST /v1/webhooks | the create fields | {webhook, secret}; secret shown once |
| GET /v1/webhooks/{id} | none | the webhook with its addresses |
| PATCH /v1/webhooks/{id} | any create field, status | the webhook |
| DELETE /v1/webhooks/{id} | none | {"deleted": true} |
| POST /v1/webhooks/{id}/rotate | none | {secret, secret_hint, previous_valid_until}; new secret shown once; old one verifies one more day |
| GET /v1/webhooks/{id}/deliveries | none; ?limit= (50, at most 200), ?before= (a line's cursor, or a Unix-ms time) | the log, newest first: a line per try, drop and test; kept at least 7 days |
| POST /v1/webhooks/{id}/test | none | {event_id, ts, outcome, http_status, reason, latency_ms, refusal}: one signed test event, tried once |
| create fields | ||
| key_id | required | a live API key; deliveries bill under it; revoking it pauses the webhook |
| url | required | https, port 443, public host name (no IP), no user, password or fragment, max 2,048 characters |
| addresses | required | base58, 1 to the plan's cap; program ids count; PATCH replaces the list. Refused: System, Token, Token-2022, Associated Token, ComputeBudget and Vote programs |
| name | optional | max 48 characters |
| tx_status | optional | "all" (the default), "success" or "failed" |
| auth_header | optional | max 512 visible ASCII characters, sent as each delivery's Authorization header; cleared by "" on PATCH or a new url without one |
| status | PATCH only | "paused" or "active"; "active" also re-enables a disabled webhook |
delivery
| part | kind | what |
|---|---|---|
| webhook-id | header | event id, same on every try; dedupe on it |
| webhook-timestamp | header | unix seconds; refuse if over 5 minutes off |
| webhook-signature | header | "v1," plus base64 HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body}, keyed with the decoded base64 after whsec_; two, space-separated, for a day after rotation |
| authorization | header | your auth_header, when set |
| body | JSON array | one transaction in getTransaction's shape: slot, blockTime (null while unknown), indexWithinBlock, transaction, meta, version; as a Helius raw webhook |
| over 64 KB | short form | past 65,536 bytes: slot, blockTime, indexWithinBlock, signature, err, status, truncated: true; rest via getTransaction |
retries and switch-off
statuses
| status | status_reason | what to do |
|---|---|---|
| active | delivering | |
| paused | null | you paused it: PATCH status "active" |
| paused | key_revoked, key_deleted, key_suspended, key_banned | PATCH a live key_id or lift the suspension; banned: contact support |
| paused | account_suspended, account_closed, account_banned | account inactive; banned: contact support |
| paused | over_plan_limit | plan lowered: newest webhooks and lists past its caps pause. Delete one, shorten the list or move up a plan |
| disabled | no success in 5 days | fix the receiver, then PATCH status "active" |
delivery log and test event
| field | kind | what |
|---|---|---|
| ts | number | Unix milliseconds (UTC) |
| event_id | string | the webhook-id sent; evt_test_ prefix on tests; empty on a drop with unknown id |
| slot | number | transaction slot; 0 on a test |
| kind | string | "delivery" or "test" |
| attempt | number | try number, 1 to 8; on a drop, tries made, 0 to 8 |
| outcome | string | "delivered"; "failed" (a delivery retries); "dropped" (event lost); "refused" (test not sent) |
| http_status | number | your url's status; 0 if no answer |
| reason | string | failed: timeout, connect, tls, http or refused (url not called: name unresolved or not public); empty if your url answered non-2xx. dropped: tries_spent, queue_full, disabled or switched_off. refused: the cause in words |
| latency_ms | number | name lookup to first answer line; 0 on a drop, refusal or uncalled url |
| cursor | string | send the last line's as ?before= for older lines |
troubleshooting
| symptom | cause | action |
|---|---|---|
| paused, with a reason | see the reason | remove the cause; resumes on its own |
| disabled | 5 days of failed tries, no 2xx; quiet or paused webhooks never disable | fix the receiver, then PATCH status "active" |
| 429 on a change | over 120 creates, edits, tests, rotations and deletes per account in 10 minutes | wait up to 10 minutes, then send it again; reads are never throttled |
| 409 on create or PATCH | the plan's webhook or address cap, named in the message | delete one, shorten the list or move up a plan |
| signature does not verify | body parsed or re-encoded before the check, another webhook's secret, or clock over 5 minutes off | verify the raw bytes with this webhook's secret |
| the same event twice | retry after a timeout or non-2xx answer | dedupe on webhook-id; answer 200 before heavy work |
| nothing arriving | no matching finalized transaction yet, tx_status skips it, or your url redirects or answers after 15 s | send a test and read its log line; then check the addresses, tx_status and the last tries |