Use this file to discover all available pages before exploring further.
The Nanopayments Gateway is Meridian’s integration of Circle Gateway nanopayments. The buyer funds a unified USDC balance once on any supported chain, then makes many gas-free, sub-cent ($0.000001 minimum) payments that Circle batches into a single onchain settlement. Each individual x402 payment is verified instantly by signature, while Circle’s Gateway System aggregates the signed authorizations and settles net positions in bulk. The Meridian facilitator wraps Circle’s @circle-fin/x402-batching/server SDK and exposes it through the standard /v1/verify and /v1/settle endpoints.
Nanopayments Gateway UI
Deposit and withdraw USDC against the Gateway Wallet contract from a hosted UI.
POST /v1/settle settles a batched payment via Circle Gateway.
Verify Batched Payment
POST /v1/verify verifies a batched payment without settling.
Gateway Status
GET /v1/batched-sample reports Gateway connectivity for diagnostics.
The buyer never submits an on-chain transaction at payment time. Funds move from their pre-funded Gateway Wallet balance through Circle’s batched settlement. Withdrawals from the Gateway Wallet are subject to a 7-day delay enforced by the Gateway Wallet contract.
This check is performed by isBatchPayment() from @circle-fin/x402-batching/server inside the facilitator’s /v1/verify and /v1/settle handlers. There are no separate URLs for batched flows. Clients call the same endpoints used for default x402 settlement, and the facilitator inspects extra to decide where to forward the request.
isGatewayEnabledForNetwork() returns true for every network listed below. Testnets are always enabled, and mainnets are gated by the GATEWAY_MAINNET_ENABLED flag in the facilitator (currently true). The Meridian facilitator will accept requests for these networks and forward them to Circle.
Three networks listed in the facilitator’s CAIP-2 map are not currently
supported by Circle’s Gateway API for nanopayments: ink, megaeth, and
fluent-testnet. The facilitator will forward the request, but Circle will
reject it. See Circle’s Gateway Supported
Blockchains
for the authoritative list (column Nanopayments: Yes). Networks marked
with [!] below are configured locally but not yet supported by Circle.
The Gateway Wallet addresses are deployed by Circle at the same address on every supported EVM chain (verified against Circle’s contract addresses page).The facilitator forwards batched requests to:
Testnet:https://gateway-api-testnet.circle.com (explicit URL passed to BatchFacilitatorClient).
Mainnet: the default URL baked into @circle-fin/x402-batching/server. The facilitator constructs new BatchFacilitatorClient() with no url override.
Buyers fund the Gateway Wallet contract on each source chain they want to spend from. Available balance is unified across deposits, so a single signed payment can be settled from any chain that has been funded.
USDC.approve(gatewayWallet, value). One-time per source chain.
GatewayWallet.deposit(usdcAddress, value). Pulls USDC and credits the depositor’s balance. Circle also exposes depositFor, depositWithPermit, and depositWithAuthorization on the wallet contract.
After the deposit transaction is finalized onchain, the credit becomes part of availableBalance and can be spent. Time-to-finality is chain-specific:
Chain family
Confirmations
Approx. time
Ethereum, Arbitrum, Base, OP, Unichain, World Chain
Sending USDC to the Gateway Wallet via a plain ERC-20 transfer instead of
one of the deposit methods will result in loss of funds. Always call a
deposit* method on the wallet contract.
Circle’s Gateway Wallet supports two withdrawal paths:
Instant (preferred): submit a same-chain transfer through the Gateway API. Funds round-trip through a burn on the source chain and a mint on the destination (same chain), so the withdrawal still requires a user-signed authorization. Pays only burn-tx gas.
Trustless (fallback for when Circle’s API is unavailable): on-chain only, with a 7-day delay enforced by the withdrawalBlock value on the Gateway Wallet contract.
GatewayWallet.initiateWithdrawal(usdc, value). Moves balance from availableBalance to withdrawingBalance and records withdrawalBlock.
After block.number >= withdrawalBlock, call GatewayWallet.withdraw(usdc). Moves the unlocked amount from withdrawableBalance back to the buyer’s wallet.
In the Nanopayments Gateway path, only extra.name and extra.version are read by the Meridian facilitator. They are the routing trigger that isBatchPayment() checks. Everything else inside extra is passed through to Circle’s Gateway API verbatim by transformForGateway(), which spreads paymentRequirements and overrides network, asset, and amount only.
Field
Required
Read by Meridian?
Description
name
✓
Routing only
Must be the literal string "GatewayWalletBatched". Together with version, it is the trigger for isBatchPayment().
version
✓
Routing only
Must be the literal string "1".
verifyingContract
No (pass-through)
Gateway Wallet contract address used by the client SDK as the EIP-712 verifyingContract when signing.
creditedRecipient
No (pass-through)
Forwarded to Circle. Note: in the default x402 path Meridian reads this field, but the batched path returns before that code runs.
platform
No (pass-through)
Forwarded to Circle. The platform / platformFeeBps settlement logic in the facilitator is not executed in the batched path.
platformFeeBps
No (pass-through)
Forwarded to Circle. Gateway batched payments do not currently charge a Meridian platform fee.
destinationChainId
No (pass-through)
Forwarded to Circle.
The buyer-side SDK sets paymentRequirements.asset to the Gateway Wallet contract so the EIP-712 domain has the correct verifyingContract. transformForGateway() swaps that back to the network’s USDC address (from NETWORK_USDC) before forwarding to Circle, since Circle expects the actual token address.
The facilitator-side glue lives in apps/facilitator/src/gateway/index.ts. It owns the testnet/mainnet client routing, the Gateway Wallet ↔ USDC asset swap, and the CAIP-2 network mapping that Circle’s API requires.