Skip to main content
The X402r SDK is in active development (v0.0.2). APIs may change between releases. Always test on Base Sepolia before using real funds on mainnet.
The X402r SDK provides a complete TypeScript implementation for integrating with the X402r refundable payments protocol. It enables clients, merchants, and arbiters to interact with smart contracts for payment authorization, escrow management, and dispute resolution.

Packages

The SDK is organized into packages designed for specific roles in the payment ecosystem:

@x402r/core

Shared types, ABIs, network config, deploy utilities, and condition builders.

@x402r/client

SDK for payers to request refunds, freeze payments, and manage escrow.

@x402r/merchant

SDK for merchants to release payments, charge, and handle refunds.

@x402r/arbiter

SDK for arbiters to resolve disputes and manage refund decisions.

@x402r/helpers

Framework-agnostic helper to mark x402 payment options as refundable with escrow configuration.

Network Support

NetworkChain IDStatus
Base Sepolia84532Tested
Base Mainnet8453Deployed, not yet tested
Ethereum1Deployed, not yet tested
Ethereum Sepolia11155111Deployed, not yet tested
Arbitrum Sepolia421614Deployed, not yet tested
Polygon137Deployed, not yet tested
Arbitrum42161Deployed, not yet tested
Optimism10Deployed, not yet tested
Avalanche43114Deployed, not yet tested
Celo42220Deployed, not yet tested
Monad143Deployed, not yet tested