DEVELOPERS

Build with Originary

AI infrastructure tools for building on the agentic web. Everything you need to integrate PEAC-Receipts today - start with the Originary CLI, PEAC Protocol SDK, and PEAC (open protocol) upstream packages.

Or apply for Cloud access for hosted verification, x402, and dashboards.

Build on an open protocol

No vendor lock-in. PEAC is an open protocol (Apache-2.0) designed for multiple independent implementations. You can self-host, use Originary's managed services, or build your own conformant implementation.

Your policies, receipts, and verification logic work across any PEAC-conformant system. Switch providers, deploy hybrid architectures, or migrate at any time.

5-Minute Quickstart

Deploy your first policy in 5 minutes

Three simple steps to start accepting agent traffic with verifiable receipts

1

Create policy file

Initialize and deploy your policy to /.well-known/peac.txt

# Install CLI and init policy
npm i -g @peac/cli
peac policy init --profile api-provider

# Generate deployment files
peac policy generate --out ./public --well-known

# Deploy to your domain
scp -r public/.well-known user@yourdomain.com:/var/www/
2

Validate policy

Validate your policy file and test rule matching

# Validate policy syntax
peac policy validate peac-policy.yaml

# Explain which rule applies for a context
peac policy explain peac-policy.yaml \
  --purpose train --type agent

# Output:
# Decision: DENY
# Matched Rule: block-training
3

Verify receipts

Verify incoming PEAC-Receipt headers in your middleware

// Cloudflare Worker / Edge middleware
import { verifyReceipt } from '@peac/protocol';

export default {
  async fetch(request) {
    const receipt = request.headers.get('PEAC-Receipt');

    if (!receipt) {
      return new Response('Payment Required', {
        status: 402,
        headers: { 'PEAC-Policy': '/.well-known/peac.txt' }
      });
    }

    const result = await verifyReceipt(receipt);
    if (!result.ok) return new Response('Invalid', { status: 403 });

    return fetch(request);
  }
}

For step-by-step implementation guides with Express, Next.js, and Cloudflare Workers, see our x402 receipts documentation.

Open Protocol (PEAC) - Upstream (link out):

# CLI and libraries (npm) npm i -g @peac/cli && npm i @peac/protocol @peac/crypto @peac/schema

Wire accuracy

Header:
PEAC-Receipt: <detached-JWS>
Policy discovery:
/.well-known/peac.txt

Learn more in the open protocol ↗.

Raw HTTP example

curl -sS https://publisher.example/api \
  -H "PEAC-Receipt: eyJfdHlwZSI6IlBFQUNSZWNlaXB0Iiwi..." \
  -H "User-Agent: Originary-AI/1.0"

Build with receipts - not SDK promises.

Use the CLI and official SDKs to validate policies and attach PEAC-Receipt headers.

API Reference

Comprehensive API documentation for all endpoints

Verification API

Verify PEAC receipts and validate policy compliance

POST/v1/verifyVerify receipt authenticity
View docs

Gateway API

Payment processing and HTTP 402 gateway functionality

POST/payment/stripeProcess payment via Stripe
View docs

Policy API

Retrieve and validate PEAC policy files

GET/v1/policies/{url}Fetch and validate policy
View docs

Need help getting started?

Our developer success team is here to help you integrate PEAC into your applications.