How Event Ledger works.
An append-only, signed record of the business events you may need to prove later. This page follows one real event from the API call to a check by someone outside the company.
- POST /v1/eventsAPI key with write scope
- SHA-256Keys sorted, then hashed
- Durable queue201 once the queue confirms
- Ed25519Your organization's key
- Ledger rowDeletes blocked by triggers
- Public proof pageNo account needed
An escrow officer approves a $412,500 release. This event was posted to the API on a development environment for a fictional issuer, Meridian Title & Escrow. Every value below comes from that run.
Your system posts the event
At the moment the release is approved, the payments system calls the API. The key must have write scope. The Idempotency-Key is yours, usually a stable reference for this action.
The requestcurl -X POST https://api.invoance.com/v1/events \ -H "Authorization: Bearer $INVOANCE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: release-pay_20418" \ -d '{ "event_type": "payment.release.approved", "event_time": "2026-10-30T09:12:44Z", "payload": { "payment_id": "pay_20418", "amount": "412500.00", "currency": "USD", "approved_by": "escrow_officer_12", "callback_confirmed": true, "beneficiary_ref": "ben_7731" } }'Invoance sorts the keys and hashes the payload
Keys are sorted at every level, arrays stay in order, and whitespace goes. The SHA-256 of those bytes is the payload_hash. The same data always gives the same hash, whichever order your code wrote the keys in.
Canonical bytes and hash# canonical JSON {"amount":"412500.00","approved_by":"escrow_officer_12","beneficiary_ref":"ben_7731","callback_confirmed":true,"currency":"USD","payment_id":"pay_20418"} # payload_hash 388e8bc243730456109910855aa6f869a5ed24ecafe54302653d3dcfd2e6b924 # recompute it printf '%s' '{"amount":"412500.00","approved_by":"escrow_officer_12","beneficiary_ref":"ben_7731","callback_confirmed":true,"currency":"USD","payment_id":"pay_20418"}' | shasum -a 256The event is queued and the API answers
The API builds the full envelope, hashes it as the request_hash, and publishes it to a durable queue. It returns 201 once the queue confirms, so a 201 means the event is safely queued. The ledger row follows from a worker.
The responseHTTP/1.1 201 Created { "event_id": "bf835274-1b4f-4355-a0f3-da2c2961a538", "ingested_at": "2026-10-30T10:17:10.643623Z" }A worker signs it with your organization's key
The worker builds the signed payload below and signs those exact bytes with your organization's Ed25519 key. Those bytes contain the payload_hash and the request_hash, so a changed payload no longer matches what was signed.
{ "v": 1, "event_id": "bf835274-1b4f-4355-a0f3-da2c2961a538", "tenant_id": "65608e5a-b092-42a1-8c47-44d6a33f1272", "event_type": "payment.release.approved", "payload_hash": "388e8bc243730456109910855aa6f869a5ed24ecafe54302653d3dcfd2e6b924", "request_hash": "3f39e2f76de684e69b3502d542875a7e258c26dcd65c6cadcb7cd4ceee8fb9ff", "ingested_at": "2026-10-30T10:17:10.643623Z" }The row is appended to the ledger
The row stores the payload, all three hashes, the signature and the signed bytes. Inserts are idempotent, so a redelivered message writes nothing new. Triggers raise an error on any DELETE or TRUNCATE.
The stored row, abridgedcompliance_events id bf835274-1b4f-4355-a0f3-da2c2961a538 event_type payment.release.approved event_time 2026-10-30T09:12:44Z ingested_at 2026-10-30T10:17:10.643623Z payload (stored, private to your organization) payload_hash 388e8bc2…d2e6b924 request_hash 3f39e2f7…ee8fb9ff event_hash ff1dc12b…f4ffde33 signing_algorithm ed25519 signature 7e546def…493e1c06 retention_policy short expires_at 2026-11-29T10:17:10.643623ZAnyone checks a copy against it
The proof endpoints need no key. They hash the copy they are given and compare it with the stored payload_hash, and they check the signature against your organization's registered key in the same request.
POST /v1/proof/event/bf835274-1b4f-4355-a0f3-da2c2961a538/verify { "event_id": "bf835274-1b4f-4355-a0f3-da2c2961a538", "match_result": true, "signature_valid": true, "anchored_hash": "388e8bc243730456109910855aa6f869a5ed24ecafe54302653d3dcfd2e6b924", "submitted_hash": "388e8bc243730456109910855aa6f869a5ed24ecafe54302653d3dcfd2e6b924", "anchored_at": "2026-10-30T10:17:10.643623+00:00", "method": "payload" }
| v | Envelope version, currently 1 |
|---|---|
event_id | The ID returned by the API |
tenant_id | Your organization |
event_type | Your name for the event |
payload_hash | Ties the signature to the payload |
request_hash | Ties the signature to the envelope |
ingested_at | The time Invoance received it |
payload_hash | SHA-256 of the canonical payload. This is what a verifier compares |
|---|---|
request_hash | SHA-256 of the full envelope: IDs, API key, times, event type, payload and idempotency key |
event_hash | SHA-256 of the payload with its keys in the order received |
Change a value and watch the check fail.
This is the comparison the proof page runs, on the sample record. Verification needs no Invoance account and no access to your systems.
- Opens the proof linkNo account, no dashboard access
- Recompute the hashSubmitted payload against anchored hash
- match_result: truePlus issuer domain and signing time
{
"payment_id": "pay_20418",
"amount": "412500.00",
"currency": "USD",
"approved_by": "escrow_officer_12",
"callback_confirmed": true,
"beneficiary_ref": "ben_7731"
}{"amount":"412500.00","approved_by":"escrow_officer_12","beneficiary_ref":"ben_7731","callback_confirmed":true,"currency":"USD","payment_id":"pay_20418"}388e8bc2…d2e6b924388e8bc2…d2e6b924Any Ed25519 library works.
The proof endpoint returns the signed bytes, the signature and the public key. Verify them yourself, then compare the payload_hash inside the signed bytes with the SHA-256 of your own canonical copy.
import { createPublicKey, verify } from "node:crypto";
const res = await fetch(`https://api.invoance.com/v1/proof/event/${eventId}`);
const { event } = await res.json();
const key = createPublicKey({
key: Buffer.concat([
Buffer.from("302a300506032b6570032100", "hex"), // Ed25519 SPKI prefix
Buffer.from(event.public_key, "hex"),
]),
format: "der",
type: "spki",
});
const signed = Buffer.from(event.signed_payload, "hex");
const signature = Buffer.from(event.signature, "hex");
console.log(verify(null, signed, key, signature)); // true
console.log(JSON.parse(signed.toString()).payload_hash);
| Hash | SHA-256 over canonical JSON: keys sorted, array order kept, no whitespace |
|---|---|
| Signature | Ed25519, one key per organization |
| Key check | Against the organization's registered key, not the copy on the row |
| Delivery | At-least-once queue, idempotent inserts |
| Retries | An Idempotency-Key replays the first response for 24 hours |
| Deletes | BEFORE DELETE and TRUNCATE triggers raise an error |
| Limits | event_type 128 chars, payload 64 KB |
| Read | GET /v1/events/{id}, 410 once a record is sealed |
| Verify with a key | POST /v1/events/{id}/verify, counted as a verification call |
| Verify without a key | POST /v1/proof/event/{id}/verify, rate limited per IP |
| Issuer key lookup | GET /keys/{domain}, base64url, for verified domains |
| Retention | Set by plan. Rows are sealed after a 30-day grace period, not deleted |
Post your first event.
Free on the Developer plan: 1,000 events a month, 30-day ledger retention.