Documentation Index
Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
Use this file to discover all available pages before exploring further.
What Are Receipts?
Receipts are signed, immutable records of discrete events — payments, security incidents, compliance checks, deliveries, and more. Unlike logs or audit trails, every receipt is:- Cryptographically signed with your issuer key (Ed25519 or ES256)
- Anchored in the transparency log with a Merkle inclusion proof
- Offline-verifiable via proof bundle export
- Idempotent — the same event always produces the same receipt
Receipt types
Platform-defined receipt types are available to all tenants. Each type has a JSON Schema that thepayload field is validated against before signing.
| Type | Use Case |
|---|---|
payment_receipt | Payments, invoices, refunds |
security_event_receipt | Auth events, key rotations, anomalies |
delivery_receipt | Document delivery, notifications |
compliance_receipt | KYC/AML checks, regulatory evidence |
custom_receipt | Any other event with open schema |
Discovering available types
CallGET /v1/receipt-types to list every type your tenant can use, or GET /v1/receipt-types/{name} to fetch a single type and inspect its JSON Schema.
Minting a receipt
Choose a receipt type
Call
GET /v1/receipt-types to list available types and inspect the schema for required fields.Build your payload
Construct the
payload object matching the required fields for your receipt type. For payment_receipt, you need amount, currency, provider, provider_reference, and subject.SDK Examples
Listing receipts
Retrieving a receipt
Webhook events
Subscribe to receipt events by configuring a webhook endpoint in the console:| Event | Triggered When |
|---|---|
receipt.created | A receipt is successfully minted |
receipt.revoked | A receipt is revoked |
Revoking a receipt
Revocation is permanent and recorded in the transparency log. Receipts with statusrevoked remain queryable and their revocation timestamp is included in proof bundles. You can include an optional reason to record why the receipt was revoked.
Verifying a receipt
Use the verify endpoint to check a receipt’s cryptographic validity and current status. The API checks the signature, key status, and revocation state, then returns a verdict.Verdicts
| Verdict | Meaning |
|---|---|
VALID | Signature is valid, key is active, receipt is not revoked |
REVOKED | Receipt has been explicitly revoked |
INVALID_SIGNATURE | Cryptographic signature verification failed |
KEY_COMPROMISED | Signing key was marked compromised at or before issuance |
KEY_INACTIVE | Signing key is no longer active |
NOT_FOUND | Receipt not found for this tenant |
Proof bundles
A proof bundle is a self-contained package for offline verification. It includes the signed receipt envelope, Merkle inclusion proof from the transparency log, and the issuer key snapshot at issuance time. After downloading a proof bundle, you can verify the receipt without making any further API calls.Searching receipts
Search across your receipts using full-text search and faceted filters. The search index supports queries against payload content, and you can narrow results by type, status, date range, or indexed payload fields.Search filters
| Field | Type | Description |
|---|---|---|
q | string | Full-text search across payload content |
receipt_type | string | Filter by type name |
status | string | active, revoked, superseded, or redacted |
issuer_id | UUID | Filter by issuer |
from_date | RFC 3339 | Start of date range |
to_date | RFC 3339 | End of date range |
index_key | string | Indexed payload field name |
index_value | string | Value to match for index_key |
limit | integer | Max results (1–100, default 20) |
offset | integer | Pagination offset |
Exporting receipts
Queue an asynchronous bulk export of receipts as JSON or CSV. The API returns immediately with a job ID. Poll the export status endpoint untilstatus is complete, then download from the pre-signed URL.
Export status values
| Status | Meaning |
|---|---|
pending | Queued, not yet started |
running | Processing records |
complete | Done — download_url is available |
failed | Error — see error_message |
Redacting receipts
Redaction permanently removes PII from a receipt’s payload while preserving the cryptographic proof. The receipt’s signature, transparency log entry, and Merkle inclusion proof remain intact — only thepayload_json is replaced with a redaction marker.
Use this for GDPR right-to-erasure requests on receipts containing personal data.
statuschanges toredactedpayload_jsonis replaced with{"redacted": true, "redacted_by": "tenant_request"}- A
RECEIPT_REDACTevent is anchored in the transparency log - All other fields (signature, log proof, receipt type) are preserved
Managing receipts in the console
You can manage the full receipts lifecycle from the console without writing any code. Open Receipts in the console sidebar to access the following features.Searching receipts
The receipts list page includes a search bar and filters. Type a keyword to search across receipt payloads, or use the filter controls to narrow results by receipt type, status, issuer, or date range. Results update in real time as you refine your query.Exporting receipts
Click Export from the receipts list to queue a bulk export as CSV or JSON. A status banner appears at the top of the page tracking the job throughpending, running, and complete states. Once the export finishes, click the banner to download the file. You can also monitor export jobs from the API using GET /v1/receipt-exports/{id} — see export receipts.
Downloading a proof bundle
Open any receipt’s detail page and click Download Proof Bundle to save a self-contained verification package. The bundle includes the signed receipt envelope, Merkle inclusion proof, and issuer key snapshot — everything needed for offline verification.Redacting a receipt
From any active receipt’s detail page, click Redact to permanently remove personally identifiable information from the payload. A confirmation dialog explains that redaction is irreversible before you proceed. Redaction is only available for receipts withactive status. After redaction, the cryptographic proof and transparency log entry are preserved — only the payload content is removed. See redacting receipts for details on what changes.
Retention policy
Receipts are automatically cleaned up based on the retention policy set at mint time. A background worker sweeps expired receipts on a regular schedule. Setretention_policy when minting:
| Policy | Duration | Description |
|---|---|---|
standard | 2 years | Default. Suitable for most transactional receipts. |
extended | 7 years | For compliance use cases requiring longer retention. |
permanent | Never | Never automatically deleted. |
Next steps
Proof bundle specification
Full structure and offline verification steps for proof bundles.
Receipts API reference
Complete API reference for minting, searching, exporting, and redacting receipts.
Webhooks
Subscribe to receipt events and process them in real time.
Issuance policies
Enforce approval workflows and constraints on receipt minting.

