Agent Commerce Compliance Skill — x402 + MPP Payment Protocol for AI Agents

$0.05 / access SKILL.md protocol

The agent-commerce-compliance-skill is a 6-phase compliance protocol for AI agents building or consuming x402 and MPP (Machine Payments Protocol) commerce integrations. Covers the full buyer flow — HTTP probe, EIP-3009 transferWithAuthorization proof construction, retry with payment proof — plus seller-side receipt validation, nonce deduplication against replay attacks, error classification with retry policies, dispute-ready audit logging, and an ACP (Stripe) interoperability layer for running x402 and MPP simultaneously.

Built for the dual-protocol era: x402 and MPP are now live in parallel. This skill covers both — write compliant buyers and sellers that work across the Coinbase/Cloudflare-backed x402 rail and the Visa/Mastercard/OpenAI/Shopify-backed MPP rail from a single codebase.

Protocol Phases

PhaseWhat It Covers
Phase 1: x402 Payment Authorization (Buyer)Probe → parse 402 → EIP-3009 transferWithAuthorization signed with ethers.js v6 → base64-encoded X-Payment header on retry
Phase 2: Receipt Validation (Seller)Nonce deduplication (Firestore-persisted Set), expiry check, EIP-712 signature verification, amount check against price manifest
Phase 3: Error Handling & Retry LogicPAYMENT_REQUIRED / INVALID_PROOF / NONCE_REPLAYED / INSUFFICIENT_FUNDS classification with per-error retry policies
Phase 4: Dispute HandlingAudit log schema: every payment event logged with nonce + SHA-256 payload hash for dispute resolution
Phase 5: ACP InteroperabilityRun x402 + ACP (Stripe/MPP) simultaneously. Header detection, fallback logic, dual-rail receipt storage
Phase 6: Compliance ChecklistProduction readiness checklist: nonce storage, expiry enforcement, audit log retention, dual-protocol coverage

Protocol Excerpt

## Phase 1: x402 Payment Authorization (Buyer) // 1. Probe the endpoint const probe = await fetch(url); // → 402 with X-Payment-Required header containing JSON payment instructions // 2. Parse payment requirements const paymentReq = JSON.parse(atob(probe.headers.get('X-Payment-Required'))); // { price: '0.05', address: '0x...', chain: 'base', currency: 'USDC', expiresAt: ... } // 3. Construct EIP-3009 transferWithAuthorization const nonce = ethers.hexlify(ethers.randomBytes(32)); const deadline = BigInt(paymentReq.expiresAt); ... [full protocol requires $0.05 access via x402 or MPP — free preview at /v1/preview/agent-commerce-compliance-skill]

Use Cases

How to Access via x402 or MPP

  1. Free preview: GET https://clawmerchants.com/v1/preview/agent-commerce-compliance-skill
  2. Probe: GET https://clawmerchants.com/v1/data/agent-commerce-compliance-skill → returns HTTP 402 with x402 + MPP payment instructions
  3. Pay via x402 (USDC on Base L2) or MPP (Stripe/card rail)
  4. Retry with payment proof header — receive full SKILL.md protocol
Ready to integrate? Free preview available — no wallet or card required: /v1/preview/agent-commerce-compliance-skill
Access the full protocol via x402 or MPP: /v1/data/agent-commerce-compliance-skill

ClawMerchants — agent commerce compliance x402 | EIP-3009 transferWithAuthorization agent | MPP payment compliance skill | x402 receipt validation nonce deduplication | ACP Stripe interoperability agent | agent payment audit log | dual-protocol x402 MPP agent skill