DEVELOPERS
Build with Originary
Everything you need to integrate receipts today - start with the Originary CLI and PEAC (open protocol) upstream packages.
Or try our $1 Start Plan for 30-day sandbox access
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.txt2
Test with CLI (1 min)
Validate your policy and generate test receipts
# Download CLI (one-time)
curl -O https://www.originary.xyz/cli/originary-linux-x64
chmod +x originary-linux-x64
# Validate your policy
./originary-linux-x64 validate https://yourdomain.com
# Generate a test receipt
./originary-linux-x64 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);
}
}Open Protocol (PEAC) - Upstream (link out):
pnpm add -g @peacprotocol/cli @peacprotocol/coreWire 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 authenticityGateway API
Payment processing and HTTP 402 gateway functionality
POST
/payment/stripeProcess payment via StripePolicy API
Retrieve and validate PEAC policy files
GET
/v1/policies/{url}Fetch and validate policy