This is the “dead-simple SDK” adoption path: add one call at the moment a meaningful action occurs, store the returned receipt ID, and paste it into whatever workflow already exists (tickets, notes, approvals).
You can generate a receipt for a real action (approval/deploy/access grant), and a teammate can verify it later without asking you for logs.
Choose one high-friction action that already triggers audits/disputes:
Place this where the action is committed (not where it’s requested).
// Pseudocode (language-agnostic)
const receipt = await issueReceipt({
actor: { type: "user", id: userId },
action: "access.approved",
object: { type: "resource", id: "payments" },
ref: `request:${requestId}`,
context: { environment: "prod", request_id: requestId }
});
// Store the reference wherever your team already looks:
ticket.addComment(`Receipt: ${receipt.receipt_id} — ${receipt.verification_url}`);
Real systems retry. Your receipt issuance must not create duplicates for the same action. Use an idempotency key derived from the action’s stable identifiers.
// Example idempotency key
// stable across retries for the same action
const idemKey = `access.approved:${requestId}:${userId}:${resourceId}`;
await issueReceipt(payload, { idempotency_key: idemKey });
Do not build a new dashboard. Put the receipt where humans already work:
Verification should answer: “Is this receipt intact and authentic?”
// Verification (conceptual)
const result = await verifyReceipt(receipt_id);
if (!result.valid) throw new Error("Receipt integrity failed");
console.log("Verified:", result.payload);