Skip to main content
PROTOCOL TRACE

PEAC transaction trace

This page shows a PEAC transaction trace end to end. An agent discovers site policy (peac.txt + aipref.json), receives an HTTP 402 challenge when payment is required, retries using a supported payment adapter, and receives a signed interaction record that anyone can verify offline.

Originary provides optional hosted components (Gateway 402, Verify), but the core record and verification flow is protocol-native and portable.

PEAC transaction trace

Click any step to explore. HTTP 402 + PEAC-Receipt flow.

12345678
1 / 8

Agent request

Autonomous agent needs your API or content

HTTP exchange sequence

Real protocol headers. PEAC-Receipt is the canonical header (no X- prefix).

REQUEST
GET /.well-known/peac.txt HTTP/1.1
Host: originary.xyz
RESPONSE
HTTP/1.1 200 OK
Content-Type: text/plain
# PEAC Policy Document
version: peac-policy/0.1
usage: conditional
purposes: [inference, ai_input]
receipts: required
attribution: required
rate_limit: 1000/hour
payment_methods: [x402]
contact: contact@originary.xyz

Live from origin

/.well-known/peac.txt
# PEAC Policy Document
version: peac-policy/0.1
usage: conditional
purposes: [inference, ai_input]
receipts: required
attribution: required
rate_limit: 1000/hour
payment_methods: [x402]
contact: contact@originary.xyz
Rail-neutral: PEAC supports multiple payment adapters via payment_methods. Receipts are verified offline via /.well-known/jwks.json.

Transaction flow

Step 1
Agent request
Autonomous agent needs your API or content
Step 2
Policy discovery
Agent fetches peac.txt and learns discovery URLs
Step 3
Preferences check
Agent fetches aipref.json (or uses cached snapshot)
Step 4
Policy evaluation
Server decides: allow, deny, or require payment (402)
Step 5
402 challenge
Server returns 402 with PAYMENT-REQUIRED instructions
Step 6
Payment adapter
Client retries using a supported adapter (x402)
Step 7
Resource access
Server returns resource when requirements are satisfied
Step 8
PEAC-Receipt
Server attaches signed PEAC-Receipt (JWS) to response

Receipt anatomy

Decoded payload showing aipref snapshot, payment evidence, and policy hash binding.

DECODED RECEIPT PAYLOAD
|

This shows why PEAC is proof: the receipt binds the request to a specific policy snapshot and payment evidence.

Receipt verification

Offline via JWKS is default. Hosted verification is optional.

DEFAULTOffline verification (JWKS)

# Any PEAC verifier can validate offline
peac verify "<PEAC-Receipt JWS>" \
--jwks https://www.originary.xyz/.well-known/jwks.json \
--subject https://www.originary.xyz/demo/paid-resource
# Output:
{
"valid": true,
"signature_verified": true,
"policy_hash_match": true,
"aipref_hash_match": true
}

OPTIONALVerify (hosted helper)

POST https://api.originary.xyz/verify
Content-Type: application/json
{"receipt": "eyJhbGciOiJFZERTQSI..."}
# Response:
{
"valid": true,
"issued_at": "2026-01-02T12:00:00Z",
"issuer": {
"domain": "originary.xyz",
"kid": "2026-01-02"
},
"signature_verified": true,
"policy_hash_match": true,
"aipref_hash_match": true
}
✓ Cryptographic proof: Each PEAC-Receipt is signed (Ed25519) and can be verified offline using the issuer JWKS. Hosted verification is optional.

Compatibility with existing signals

PEAC works alongside existing policy and licensing standards.

AIPREF

Machine-readable AI preferences (IETF WG). This demo snapshots aipref.json into the receipt for auditability.

Learn more

Content Signals

Cloudflare robots.txt extensions (ai-input, ai-train). Can be ingested as additional inputs to policy snapshots.

Learn more

RSL

Really Simple Licensing for machine-readable terms. PEAC receipts can bind requests to RSL terms for auditability.

Learn more

Audit-ready exports

Dispute packet format for compliance and audit trails.

{"ts":"2026-01-02T12:00:00Z","request_hash":"sha256-...","policy_hash":"sha256-...","aipref_hash":"sha256-...","receipt_jws":"eyJhbGci...","payment_reference":"x402_pay_..."}
{"ts":"2026-01-02T12:01:00Z","request_hash":"sha256-...","policy_hash":"sha256-...","aipref_hash":"sha256-...","receipt_jws":"eyJhbGci...","payment_reference":"x402_pay_..."}
{"ts":"2026-01-02T12:02:00Z","request_hash":"sha256-...","policy_hash":"sha256-...","aipref_hash":"sha256-...","receipt_jws":"eyJhbGci...","payment_reference":"x402_pay_..."}