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.

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 (2 min)

Deploy your Originary policy to /.well-known/peac.txt

# Step 1: Create the file
echo 'version: 1.0
access: conditional
attribution: required
pricing:
  model: per-request
  amount: 0.001
  currency: USD
settlement: x402' > peac.txt

# Step 2: Deploy to your domain
scp peac.txt user@yourdomain.com:/var/www/.well-known/

# Step 3: Verify it's live
curl https://yourdomain.com/.well-known/peac.txt
2

Test with CLI (1 min)

Validate your policy and generate test receipts

# Run without installing (recommended)
npx @peac/cli@latest validate https://yourdomain.com

# Generate a test receipt
npx @peac/cli@latest receipt \
  --domain yourdomain.com \
  --amount 0.001

✓ Policy valid
✓ Receipt generated: eyJfdHlwZSI6IlBFQUNS...
3

Accept traffic (2 min)

Start processing agent requests with receipts

// Add to your edge/middleware (Cloudflare example)
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' }
      });
    }

    // Verify receipt (cached for performance)
    const valid = await verifyReceipt(receipt);
    if (!valid) return new Response('Invalid', { status: 403 });

    // Process the request
    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.