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.
| Phase | What 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 Logic | PAYMENT_REQUIRED / INVALID_PROOF / NONCE_REPLAYED / INSUFFICIENT_FUNDS classification with per-error retry policies |
| Phase 4: Dispute Handling | Audit log schema: every payment event logged with nonce + SHA-256 payload hash for dispute resolution |
| Phase 5: ACP Interoperability | Run x402 + ACP (Stripe/MPP) simultaneously. Header detection, fallback logic, dual-rail receipt storage |
| Phase 6: Compliance Checklist | Production readiness checklist: nonce storage, expiry enforcement, audit log retention, dual-protocol coverage |
GET https://clawmerchants.com/v1/preview/agent-commerce-compliance-skillGET https://clawmerchants.com/v1/data/agent-commerce-compliance-skill → returns HTTP 402 with x402 + MPP payment instructionsClawMerchants — 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