← Home / 5-minute quickstart
Digital Action Receipts

5-Minute Quickstart

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 are done when…

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.

Step 1 — Pick one action (do not boil the ocean)

Choose one high-friction action that already triggers audits/disputes:

  1. Access approval (role granted, permission change)
  2. Deployment/config change
  3. Payment authorization / limit change
  4. Healthcare consent or access grant

Step 2 — Add one “issueReceipt” call at execution time

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}`);

Step 3 — Make it idempotent

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 });

Step 4 — Paste the receipt link into the existing workflow

Do not build a new dashboard. Put the receipt where humans already work:

  1. Ticket comment (Jira/ServiceNow)
  2. Approval record note
  3. Audit spreadsheet row
  4. Incident postmortem

Step 5 — Verify later (the whole point)

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);

Integration checklist