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:
- Verify signed JSON first — schema validation, forbidden-field rejection,
receipt_idderivation, and Ed25519 signature verify (POST /protocol/v2/agent-receipts/verify, KitverifyAgentReceiptV1FromJSON, Goagentreceipt.VerifyAgentReceiptV1JSON, Rustverify_agent_receipt_v1_from_json, or CLIpaybond receipts verify --kind agent --file receipt.json). Optional Gateway JWKS / tenant trust-registry pinning applies the same as receipt verify. - Validate PDF export manifest — conformant manifests use kind
paybond.agent_receipt_pdf_export_manifest_v1(schema atkit/agent-receipt/pdf-export-manifest-schema.json). Manifests must bindreceipt_idandmessage_digest_sha256_hexto the verified receipt and recordsource_kind(gateway_fetch,audit_export, orlocal_file). - Stamp the footer — every page footer (or cover back-matter) must include label
Derived from paybond.agent_receipt_v1with the samereceipt_idandmessage_digest_sha256_hexas the verified JSON. The manifestfooter_stampobject must match. - 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, andcanonical_receipt, plus the same privacy fields rejected by agent receipt schema validation. - Optional PDF integrity — when
pdf_sha256_hexis set on the manifest, verifiers may hash the PDF bytes and reject mismatches.
Reference implementations (verify gate helpers):
| Language | Package / path |
|---|---|
| Go | go/gateway/internal/protocol/agentreceipt/pdfexport.GateRender |
| TypeScript | gateAgentReceiptPDFExport in @paybond/kit |
| Rust | gate_agent_receipt_pdf_export in paybond-agent-receipt |
| Python | gate_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)
- Verify the signed JSON with
POST /protocol/v2/agent-receipts/verifyor Kit offline verify (paybond receipts verify --kind agent). - Treat any PDF as a non-authoritative rendering of the verified JSON.
- Reject PDFs that cannot be tied to a verified JSON
receipt_idandmessage_digest_sha256_hexvia manifest and footer stamp.
Source artifacts
| Source | Path / API | Role |
|---|---|---|
| Gateway fetch | GET /protocol/v2/agent-receipts/{receipt_id} | Live signed JSON |
| Audit export | agent_receipts/{receipt_id}.json | Compliance bundle copy |
| Evidence timeline | evidence_timeline.json domain agent_receipt | Cross-links receipt to intent/tool timeline |
PDF section mapping
| PDF section | JSON source | Notes |
|---|---|---|
| Cover / title | kind, scope, receipt_id, issued_at | Show scope (action vs intent_terminal) |
| Tenant & identity | tenant_id, authorization.principal_did, authorization.actor_subject | No raw user prompts |
| Agent attestation | authorization.agent.* | Model family, config/prompt digests only |
| Policy | authorization.policy.*, authorization.decision_id, authorization.audit_id | Include content_digest_sha256_hex |
| Tool execution | execution.* | Tool name, operation, outcome, duration; argument/result digests only |
| Merchant | merchant.* | Payee DID and vendor references |
| Evidence | evidence.* | Completion preset, payload/artifacts digests, predicate result |
| Payment | payment.* | Intent, rail, funding reference digests |
| Outcome | outcome.*, references.* | Harbor state, ledger seq, linked settlement receipt |
| External proofs | external_attestations[] | Partner attestations (SEP-2828, x402, AP2, etc.) |
| Operator counter-sig | operator_attestation (optional) | Model attestation layer over Gateway digest |
| Signature block | signing_algorithm, message_digest_sha256_hex, signing_public_key_ed25519_hex | QR/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
- Load signed JSON from Gateway fetch, audit export, or an already-verified local file.
- Run the verification gate (verify JSON → validate manifest → bind stamps).
- Map fields using the table above.
- Stamp
Derived from paybond.agent_receipt_v1withreceipt_idandmessage_digest_sha256_hexin the footer. - Emit
paybond.agent_receipt_pdf_export_manifest_v1alongside the PDF when bundling for compliance handoff. - Never embed unsigned JSON inside the PDF as a substitute for Gateway verification.