| title | What is x402r? |
|---|---|
| description | x402r adds escrow deposits, refund windows, and dispute resolution to HTTP-native payments |
| icon | house |
x402r is a refundable payments protocol extension for x402. It enables secure, reversible transactions with built-in buyer protection through smart contract escrow on Base.
Standard x402 payments are immediate and irreversible. x402r adds:
- Escrow deposits — Funds held in smart contracts until conditions are met
- Refund windows — Configurable time periods for buyers to request refunds
- Dispute resolution — Arbiter system for handling contested transactions
sequenceDiagram
participant Client
participant Merchant
participant Escrow
participant Arbiter
Client->>Escrow: Pay (funds held)
Escrow-->>Merchant: Payment notification
alt Happy path
Merchant->>Escrow: Release funds
Escrow->>Merchant: Transfer
else Refund requested
Client->>Escrow: Request refund
Merchant->>Escrow: Approve/Deny
alt Disputed
Arbiter->>Escrow: Resolve dispute
end
end
x402r consists of these core components:
| Component | Purpose |
|---|---|
| PaymentOperator | Manages payment authorization, release, charge, and refunds with pluggable conditions |
| AuthCaptureEscrow | Holds ERC-20 tokens during the payment lifecycle (from commerce-payments) |
| Conditions & Recorders | Pluggable authorization checks (before action) and state updates (after action) |
| EscrowPeriod & Freeze | Time-based release and freeze policies for buyer protection |
| RefundRequest | Handles refund request lifecycle and approvals |
All protocol contracts use unified CREATE3 addresses — same address on every supported chain.
| Network | Chain ID | Status |
|---|---|---|
| Base | 8453 | Supported |
| Ethereum | 1 | Supported |
| Polygon | 137 | Supported |
| Arbitrum One | 42161 | Supported |
| Optimism | 10 | Supported |
| Celo | 42220 | Supported |
| Avalanche C-Chain | 43114 | Supported |
| Monad | 143 | Supported |
| Linea | 59144 | Supported |
| Base Sepolia | 84532 | Testnet |
| Ethereum Sepolia | 11155111 | Testnet |