Run Your Own Router
Every x402Flex settlement must route through an X402FlexRouter. You can use the Pepay Labs router, or operate your own router + registry stack.
Two paths
| Path | When to use it | What changes for you |
|---|---|---|
| Pepay Labs registry + router allowlist | You want to be an approved router without owning the registry. | Pepay Labs administers registry roles; you run router infra and receive settlements. |
| Self-host full stack (router + registry + session store) | You want full control over roles, fees, and allowlists. | You deploy and operate contracts, RPC, indexers, and off-chain services. |
Option A: Get allowlisted as a router
If you want to run a router that settles into the Pepay Labs registry, contact:
contact@pepay.io
Include:
- Target chain(s) and chain IDs.
- Router admin address.
- Fee recipient address.
- Operational contact for incident response.
Once approved, Pepay Labs will add your router to the registry allowlist and provide the current policy requirements.
Option B: Self-host the full contract stack
Running your own stack means you own the full settlement surface and operational policy.
Minimum components
X402FlexRouterX402FlexRegistryX402FlexSessionStore(if you want sessions, subscriptions, or claimable flows)
Operational responsibilities
- Maintain router admin keys and role rotation policy.
- Configure registry allowlists (tokens, routers, fee caps).
- Publish registry + router addresses for SDKs and 402 responses.
- Provide RPC endpoints, monitoring, and event indexing.
Integration steps
- Deploy contracts on your target chain(s).
- Configure registry roles and allowlists.
- Point SDK + middleware to your router/registry addresses.
- Ensure your 402 payloads embed your router address so clients sign against it.
SDK + API alignment
- Update SDK configuration (
contractssection) to use your router/registry addresses. - Ensure the HTTP 402 response includes the correct router address for each accept option.
- Off-chain indexers should follow your registry address for canonical
PaymentSettledV2receipts.
If you want a guided deployment playbook or audited deployment scripts, contact contact@pepay.io.