paybondpaybond
Sign in

Agent receipt PDF export (derived view)

Normative mapping from signed paybond.agent_receipt_v1 JSON to a human-readable PDF presentation layer, with a verification gate and export manifest schema.

PDF export for agent receipts is a presentation layer only. The signed JSON artifact remains canonical; PDFs are derived views for human review, similar to compliance audit export bundles.

Verification gate (required)

Any in-repo or partner PDF renderer must pass this gate before emitting or accepting a derived PDF:

  1. Verify signed JSON first — schema validation, forbidden-field rejection, receipt_id derivation, and Ed25519 signature verify (POST /protocol/v2/agent-receipts/verify, Kit verifyAgentReceiptV1FromJSON, Go agentreceipt.VerifyAgentReceiptV1JSON, Rust verify_agent_receipt_v1_from_json, or CLI paybond receipts verify --kind agent --file receipt.json). Optional Gateway JWKS / tenant trust-registry pinning applies the same as receipt verify.
  2. Validate PDF export manifest — conformant manifests use kind paybond.agent_receipt_pdf_export_manifest_v1 (schema at kit/agent-receipt/pdf-export-manifest-schema.json). Manifests must bind receipt_id and message_digest_sha256_hex to the verified receipt and record source_kind (gateway_fetch, audit_export, or local_file).
  3. Stamp the footer — every page footer (or cover back-matter) must include label Derived from paybond.agent_receipt_v1 with the same receipt_id and message_digest_sha256_hex as the verified JSON. The manifest footer_stamp object must match.
  4. Never embed unsigned JSON as authority — PDF attachments, XMP metadata, or embedded files must not carry raw receipt JSON (or subsets) as a substitute for Gateway verification. Forbidden manifest keys include embedded_receipt_json, receipt_json, unsigned_receipt, and canonical_receipt, plus the same privacy fields rejected by agent receipt schema validation.
  5. Optional PDF integrity — when pdf_sha256_hex is set on the manifest, verifiers may hash the PDF bytes and reject mismatches.

Reference implementations (verify gate helpers):

LanguagePackage / path
Gogo/gateway/internal/protocol/agentreceipt/pdfexport.GateRender
TypeScriptgateAgentReceiptPDFExport in @paybond/kit
Rustgate_agent_receipt_pdf_export in paybond-agent-receipt
Pythongate_agent_receipt_pdf_export in paybond_kit.agent_receipt_pdf_export

Conformance vectors: kit/agent-receipt/conformance/pdf-export-manifest-v1.json (manifest) paired with signed-action-receipt-v1.json (receipt).

v1 does not ship an in-repo PDF renderer. The gate and manifest schema are scaffolding for future renderers and partner integrations.

Verification order (reviewers)

  1. Verify the signed JSON with POST /protocol/v2/agent-receipts/verify or Kit offline verify (paybond receipts verify --kind agent).
  2. Treat any PDF as a non-authoritative rendering of the verified JSON.
  3. Reject PDFs that cannot be tied to a verified JSON receipt_id and message_digest_sha256_hex via manifest and footer stamp.

Source artifacts

SourcePath / APIRole
Gateway fetchGET /protocol/v2/agent-receipts/{receipt_id}Live signed JSON
Audit exportagent_receipts/{receipt_id}.jsonCompliance bundle copy
Evidence timelineevidence_timeline.json domain agent_receiptCross-links receipt to intent/tool timeline

PDF section mapping

PDF sectionJSON sourceNotes
Cover / titlekind, scope, receipt_id, issued_atShow scope (action vs intent_terminal)
Tenant & identitytenant_id, authorization.principal_did, authorization.actor_subjectNo raw user prompts
Agent attestationauthorization.agent.*Model family, config/prompt digests only
Policyauthorization.policy.*, authorization.decision_id, authorization.audit_idInclude content_digest_sha256_hex
Tool executionexecution.*Tool name, operation, outcome, duration; argument/result digests only
Merchantmerchant.*Payee DID and vendor references
Evidenceevidence.*Completion preset, payload/artifacts digests, predicate result
Paymentpayment.*Intent, rail, funding reference digests
Outcomeoutcome.*, references.*Harbor state, ledger seq, linked settlement receipt
External proofsexternal_attestations[]Partner attestations (SEP-2828, x402, AP2, etc.)
Operator counter-sigoperator_attestation (optional)Model attestation layer over Gateway digest
Signature blocksigning_algorithm, message_digest_sha256_hex, signing_public_key_ed25519_hexQR/deep-link to verify endpoint optional

Must NOT appear in PDF

  • Raw system or user prompts
  • Tool arguments or tool results (only *_digest_sha256_hex)
  • Evidence payloads or artifact bodies
  • Payment card numbers (PAN), CVV, or full bank account numbers
  • Capability tokens, API keys, or private signing material
  • Unsigned receipt JSON embedded as an authority substitute (use verify and footer stamp instead)

Renderer checklist

  1. Load signed JSON from Gateway fetch, audit export, or an already-verified local file.
  2. Run the verification gate (verify JSON → validate manifest → bind stamps).
  3. Map fields using the table above.
  4. Stamp Derived from paybond.agent_receipt_v1 with receipt_id and message_digest_sha256_hex in the footer.
  5. Emit paybond.agent_receipt_pdf_export_manifest_v1 alongside the PDF when bundling for compliance handoff.
  6. Never embed unsigned JSON inside the PDF as a substitute for Gateway verification.