Contracts Overview
All settlement goes through X402FlexRouter → X402FlexRegistry. Direct registry calls are unsupported.
X402FlexRouter
- Validates
PaymentIntent+FlexWitness. - Supports push, Permit2, EIP-2612, EIP-3009, and session spend entry points.
- Emits
PaymentSettledV2via the registry. - Includes admin-only rescue functions (
rescueERC20,rescueNative) for accidental deposits.
X402FlexRegistry
Canonical event:
event PaymentSettledV2(
bytes32 indexed paymentId,
address indexed payer,
address indexed merchant,
address token,
uint256 amount,
uint256 feeAmount,
bytes32 schemeId,
string referenceData,
bytes32 referenceHash,
bytes32 resourceId,
uint256 timestamp
);
X402FlexSessionStore (SessionGuard)
- Validates session grants and claimable grants.
- Tracks spend nonces + rate limits.
- Emits session open/spend/revoke events for indexers.
Run Your Own Router
Self-hosting the router means you operate the settlement entry point that validates intents and calls X402FlexRegistry.settleFromRouter.
If you want to settle into the Pepay-managed registry, email contact@pepay.io so your router can be allowlisted and granted COLLECTOR_ROLE.
Full deployment steps and wiring details are documented here: Run Your Own Router.
Addresses
The docs homepage lists current mainnet/testnet addresses pulled from docusaurus.config.ts.