Home
Home/How it works/Event Ledger
Ed25519 signaturesSHA-256 hashes8 SDKs
Status
Sign inStart free
Home
How it works · Event Ledger

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.

Start freeWhere it is used
sha-256 · 3a352297…2592
sha-256 · 366ac256…b946
An event ledger, livePOST /v1/events
acme.com · event ledgerLive
5 events · signatures valid · append-only
The path of a request
  1. 01 · SendPOST /v1/eventsAPI key with write scope
  2. 02 · HashSHA-256Keys sorted, then hashed
  3. 03 · QueueDurable queue201 once the queue confirms
  4. 04 · SignEd25519Your organization's key
  5. 05 · AppendLedger rowDeletes blocked by triggers
  6. 06 · CheckPublic proof pageNo account needed
One event, start to finishAPI reference

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.

  1. 01 of 06

    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 request
    curl -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"
        }
      }'
    
  2. 02 of 06

    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.

    You can reproduce this yourself. The command below prints the payload_hash.

    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 256
    
  3. 03 of 06

    The 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.

    A retry with the same key and body gets this same response. The same key with a different body gets 409 idempotency_key_reuse_mismatch.

    The response
    HTTP/1.1 201 Created
    
    {
      "event_id": "bf835274-1b4f-4355-a0f3-da2c2961a538",
      "ingested_at": "2026-10-30T10:17:10.643623Z"
    }
    
  4. 04 of 06

    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"
    }
    
  5. 05 of 06

    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.

    This run was on the free plan, so the row keeps a 30-day expiry. On Growth it would be seven years.

    The stored row, abridged
    compliance_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.643623Z
    
  6. 06 of 06

    Anyone 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.

    The edited copy fails on the hash, while the signature stays valid. The record is intact and the copy is not.

    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"
    }
    
What the signature covers
The seven signed fields
vEnvelope version, currently 1
event_idThe ID returned by the API
tenant_idYour organization
event_typeYour name for the event
payload_hashTies the signature to the payload
request_hashTies the signature to the envelope
ingested_atThe time Invoance received it
The three hashes
payload_hashSHA-256 of the canonical payload. This is what a verifier compares
request_hashSHA-256 of the full envelope: IDs, API key, times, event type, payload and idempotency key
event_hashSHA-256 of the payload with its keys in the order received
How a third party verifiesOpen the verifier

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.

  1. 01 · AnyoneOpens the proof linkNo account, no dashboard access
  2. 02 · CheckRecompute the hashSubmitted payload against anchored hash
  3. 03 · Resultmatch_result: truePlus issuer domain and signing time
The copy you hold
{
  "payment_id": "pay_20418",
  "amount": "412500.00",
  "currency": "USD",
  "approved_by": "escrow_officer_12",
  "callback_confirmed": true,
  "beneficiary_ref": "ben_7731"
}
Canonical bytes{"amount":"412500.00","approved_by":"escrow_officer_12","beneficiary_ref":"ben_7731","callback_confirmed":true,"currency":"USD","payment_id":"pay_20418"}
Signed record · payload_hash388e8bc2…d2e6b924
Your copy · SHA-256, computed in this browser388e8bc2…d2e6b924
Your copy matches the signed recordChange one character in a field above and the hash changes completely.
Check the signature yourself

Any 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.

For a verified domain, GET /keys/{domain} returns the issuer's key, so you can confirm which key signed.

Node
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);
Technical factsAPI reference
HashSHA-256 over canonical JSON: keys sorted, array order kept, no whitespace
SignatureEd25519, one key per organization
Key checkAgainst the organization's registered key, not the copy on the row
DeliveryAt-least-once queue, idempotent inserts
RetriesAn Idempotency-Key replays the first response for 24 hours
DeletesBEFORE DELETE and TRUNCATE triggers raise an error
Limitsevent_type 128 chars, payload 64 KB
ReadGET /v1/events/{id}, 410 once a record is sealed
Verify with a keyPOST /v1/events/{id}/verify, counted as a verification call
Verify without a keyPOST /v1/proof/event/{id}/verify, rate limited per IP
Issuer key lookupGET /keys/{domain}, base64url, for verified domains
RetentionSet 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.

Start freeOpen the verifierAll mechanisms

Verified documents and records. Invoance records the exact version of every invoice, report and notice your company sends, so the people who receive them can confirm they have the version you sent, without taking your word for it.

Products

  • Evidence Rooms
  • Audit Logs
  • Event Ledger
  • AI Attestation
  • Document Anchoring
  • Traces

Developers

  • Documentation
  • API reference
  • SDKs
  • How it works
  • How traces seal
  • System status

Verify

  • Audit Log
  • Event
  • AI Attestation
  • Document
  • Trace

Company

  • Company overview
  • What is Invoance
  • Pricing
  • Security
  • Compliance teams
  • Finance teams
  • Partners
  • Brand assets
  • Resources
  • Help center
  • Contact
© 2025 – 2026 Invoance, Inc. All rights reserved.© 2026 Invoance, Inc. All rights reserved.
TermsPrivacyLegal noticeLegal FAQ