Check an Apier receipt, online or offline
How the free receipt check works: the seven findings it reports, the page that checks a receipt in your browser, the keyless MCP tool and REST call, the offline procedure for when Apier is unreachable, and the fingerprints of Apier's signing keys.
[Cite this as: Apier.no Docs v0.1.0 — last updated 2026-11-25]
A receipt is anything Apier signs for you to keep: a verification
certificate from ?certificate=true, an evidence pack or a notary record.
Each carries a signature field, a detached JWS over the rest of the object.
The receipt check is for the person who receives one. It is free, and it needs no account and no API key. There are four ways to run it, and they report the same findings:
| Where | The receipt goes to Apier? | Use it when |
|---|---|---|
| The receipt check page (Norwegian) | No. It is checked in your browser and only a hash is sent (for a notary record, its record hash as well). | A person wants to check one receipt. |
MCP tool check_receipt | Yes, in the tool call. | An agent holds the receipt. |
POST /api/v1/public/receipts/verify | Yes, in the request body. | Your code holds the receipt. |
| Offline, with the SDK | No. Nothing is sent. | Apier must not see the receipt, or is unreachable. |
Apier stores nothing you send to the tool or the endpoint. Its logs keep the receipt's hash and the result codes, never the receipt.
The seven findings
The check does not give one verdict. It reports seven findings, and each stands alone: one that could not be checked does not turn another into a failure.
| Finding | Values | What it tells you |
|---|---|---|
signature | matches, does_not_match, could_not_be_checked | Whether the content is exactly what was signed. One changed character gives does_not_match. |
signing_key | current, retired, revoked, unknown, sandbox, could_not_be_checked | Which key signed it, with its fingerprint. A retired key still checks the receipts it signed while in use. A revoked key carries a warning. |
environment | production, sandbox, issuer_not_recognised, could_not_be_checked | A sandbox receipt is made with test data and signed with a public key. |
log_inclusion | found_matching, found_different, not_found, not_applicable, could_not_be_checked | Whether the receipt's hash is in the public receipt log. Sandbox receipts are never logged, so they answer not_applicable. |
anchor | covered, head_recorded, not_yet_covered, not_applicable, could_not_be_checked | Whether a daily anchor covers the log entry. covered needs an anchor that carries a timestamp token; head_recorded means an anchor recorded the log head but no token is shown for it. |
format_version | recognised, not_recognised, could_not_be_checked | The JWS typ. Today's receipts carry apier-verify-cert+jws. |
recorded_result | read, not_read | The status fields the receipt records, quoted exactly. Read only when the signature matches. |
The page reads the newest 30 anchors from the log. For an older receipt it
can name a later anchor than the endpoint and the tool do. Both anchors cover
the entry, and the endpoint names the first one. When the page cannot see
enough anchors to say more, anchor is could_not_be_checked.
Two of these are easy to mix up. signature says the receipt is intact.
recorded_result says what the receipt records, and a receipt can be intact
and still record a check that failed. Read them apart.
A sandbox receipt never answers verified on the older signature_check
field. Its signature finding is matches against the public sandbox key, and
every part of the result says sandbox.
What a result does not show
Every result carries three fixed sentences under notes, in English and
Norwegian:
- This shows what Apier recorded at that time. It does not show the register today.
- An intact receipt shows that Apier signed this content and that it has not been changed since. It does not show internal authority, board resolutions, authority that follows from a position (stillingsfullmakt) or legal effect.
- Apier does not timestamp each receipt. Once a day, at about 02:30 UTC, an RFC 3161 timestamp from FreeTSA or Sectigo covers the previous UTC day's archive root and the head of the public receipt log at the end of that day. A receipt logged on or before that day is covered through the log's hash chain. These are not qualified timestamps.
The timestamp has covered the receipt log head since the anchor of 2026-11-23.
A receipt logged before that date is covered by that anchor or a later one
through the hash chain, which is why findings.anchor.anchor_date is never
earlier than 2026-11-23.
Call the endpoint
Split the receipt from its payload and send both. Nothing else is needed.
curl -s -X POST https://www.apier.no/api/v1/public/receipts/verify \
-H "Content-Type: application/json" \
-d '{"receipt":"<the signature field>","payload":{ "...": "the object without its signature field" }}'The response keeps every field it had before (signature_check,
key_status, receipt_log and the rest, described in
How to verify an Apier receipt) and adds
check_version, findings and notes.
Over MCP the same call is the tool check_receipt with the arguments
receipt and payload. It is keyless: call it with no Authorization
header. Keyless calls are limited to 100 an hour per IP address.
Check a receipt offline
You can run the check with Apier unreachable. You need these things, and you can save all of them ahead of time:
- The receipt, exactly as you received it.
- The key sets:
https://www.apier.no/.well-known/jwks.json(production) andhttps://www.apier.no/.well-known/sandbox-jwks.json(sandbox). - The key history:
https://www.apier.no/.well-known/signing-key-history.json. Save it together with the production key set, in the same sitting. The history is signed by the production key that is current when you download it, and it is used only when that key is in the key set you pass. A key set saved before a rotation does not hold the key that signs a history saved after it, and the history is then ignored. - The receipt's log entry, from
https://www.apier.no/api/v1/public/receipt-log?entry_hash=<hash>. For a certificate or an evidence pack the hash is the SHA-256 of the receipt'ssignaturestring in hex. A notary record is logged under its record hash, so for a notary receipt the hash is itsresult.record_hash. Savedata.entries[0]and thedata.anchorsarray of the same response. A sandbox receipt has no log entry. - For the anchor finding, which anchors carry a timestamp token:
https://www.apier.no/api/v1/public/anchors?limit=100. An anchor row is written before its token is attached. Settimestamped: trueon each saved anchor whose date has a non-emptytsa_tokenslist there.
Then run the SDK's verifier. It uses WebCrypto only and makes no network call:
import { checkReceipt, renderReceiptCheckText } from "@apier-no/sdk";
const { signature, ...payload } = certificate;
const check = await checkReceipt({
receipt: signature,
payload,
jwks, // saved /.well-known/jwks.json
sandbox_jwks: sandboxJwks, // saved /.well-known/sandbox-jwks.json
key_history: keyHistory, // saved /.well-known/signing-key-history.json
log_entry: logEntry, // the saved entry, null if you looked and found none
anchors, // data.anchors of the same log response, with timestamped: true where a token exists
});
console.log(check.findings.signature.status);
console.log(renderReceiptCheckText(check, { locale: "en", checkedAt: new Date() }));verifyReceipt(), the signature check on its own, is in @apier-no/sdk 0.1.2
on npm. checkReceipt() adds the key history, the log entry and the seven
findings, and it is in the SDK from the release after 0.1.2.
What the offline check does with each input:
- The key history is used only when its own signature checks against the
production key set. It then adds what a saved key set may be missing: a key
that has since been retired is reported as
retired, and a key that has since been marked compromised is reported asrevoked. - The log entry is compared with the receipt. The same hash gives
found_matching. A different hash, or an entry whose ownchain_hashdoes not follow from its fields, givesfound_different. Passingnullgivesnot_found, and leaving it out givescould_not_be_checked. - The anchors are compared with the entry. An anchor covers it when the
anchor's day is on or after the day the entry was logged, its recorded log
head is at or past the entry, and it is dated 2026-11-23 or later. With
timestamped: truethat givescovered; without it,head_recorded. - The key history's dates are applied only to the key whose fingerprint the
history lists. A saved key with the same key id and another fingerprint
keeps its own state and gets a
fingerprint_mismatchwarning. - The fingerprint of the key that checked the signature is in
findings.signing_key.fingerprint. Compare it with the table below. findings.signing_key.kidis given only when it names a key in the key sets you passed, andfindings.format_version.typonly when it isapier-verify-cert+jws. Any other header text is not repeated.
Without the SDK, the same check takes three steps: canonicalise the object
without signature (keys sorted at every level, no whitespace), check the
JWS signature over <header>.<base64url of that JSON> with the key whose kid
the header names, and compare a hash with the log entry's entry_hash. For a
certificate or an evidence pack that hash is the SHA-256 of the signature
string. For a notary receipt it is the receipt's result.record_hash, and
the entry's kind is notary.
Signing keys and their fingerprints
Apier publishes two key sets and one history:
| Document | What it holds |
|---|---|
/.well-known/jwks.json | The production keys: the current key first, then every retired key, each marked apier_retired_at. Production receipts are RS256. |
/.well-known/sandbox-jwks.json | The public sandbox key, marked apier_sandbox. Sandbox receipts are EdDSA. Anyone can sign with this key. |
/.well-known/signing-key-history.json | Every key Apier has used, production and sandbox: kid, environment, alg, jwk_thumbprint, jwks_uri, valid_from, valid_to, state (current, retired or compromised) and compromised_at. |
The key history is signed: its signature field is a detached JWS over the
canonical JSON of the document without signature, made with the current
production key under typ apier-key-history+jws. Check it with
verifyKeyHistory(document, jwks) from the SDK. valid_from is null for
the two keys below because no start date was recorded for them; keys added
later carry a date. Retired keys are never removed.
The fingerprints are RFC 7638 SHA-256 thumbprints, base64url. On 2026-11-25 they were:
| Environment | Key id | Algorithm | Fingerprint |
|---|---|---|---|
| Production | 23ea57b8-e354-4de7-b346-373f2b0709d9 | RS256 | GzoLI051QXOp29_CTjdVJ9-M6WkSijB-s0FQbrnhS8M |
| Sandbox | apier-sandbox-cert-1 | EdDSA | qnpjVSMZNedwRSYHFAy7VDMTbIDuLDwbDhdAmVTIKXE |
A checker that shows another fingerprint for one of these key ids is not
using Apier's key. Apier's own check is at https://www.apier.no/receipt-check
and https://www.apier.no/no/receipt-check, and nowhere else.
Try it with a sandbox receipt
The receipt check page has two samples: a sandbox receipt and the same receipt
with one character changed. You can also fetch a sandbox receipt yourself: pick
a fixture company from GET /api/v1/sandbox/fixtures and call the sandbox with
the sandbox bearer and a suffix of your own choice.
curl -s "https://www.apier.no/api/v1/sandbox/company/{org}/verify?certificate=true" \
-H "Authorization: Bearer apier_sandbox_test_<suffix>"The first sample answers signature: matches with environment: sandbox.
The altered one answers signature: does_not_match, and nothing is read from
its content.
How to verify an Apier receipt
Check that a verification certificate, evidence pack or notary record was signed by Apier, with no API key and at no cost: one POST call, or fully offline with verifyReceipt() in the TypeScript SDK.
How to check how fresh Apier's sources are
Read the public source health endpoint: last successful fetch, lag, 30-day outage windows, coverage start and licence for every source Apier fetches on a schedule, with no API key.