Skip to main content
The Merchant Top-up Gateway turns a single x402 payment into an onchain action on a third-party (“merchant”) contract. The buyer signs a gasless EIP-3009 USDC authorization on Base, Optimism, or Ink; Meridian settles it to a dedicated Base relayer wallet (bridging through Across when needed); the relayer then performs the merchant-side fulfillment transaction on the buyer’s behalf. The buyer never needs ETH. The first supported merchant is AntSeed: topping up AntseedDeposits buyer balances on Base — the one gas-requiring step in AntSeed’s otherwise gasless buyer flow. Once the deposit lands onchain, the balance appears in all AntSeed tooling automatically.

Base URL

https://antseed.mrdn.finance
A web UI for interactive top-ups is served at the same origin; the endpoints below are the programmatic surface. All endpoints are scoped by merchant id (antseed).

Endpoints

Create Top-up

POST /v1/{merchant}/topups — x402-paid

Quote Bounds

GET /v1/{merchant}/topups/quote — free

Top-up Status

GET /v1/{merchant}/topups/{id} — free

How it works

  1. POST /v1/antseed/topups with no payment — you receive 402 Payment Required with one payment-requirements entry per eligible source in accepts[], plus source-specific bounds in topup.sources[]. Base is first.
  2. Choose a source and sign an EIP-3009 TransferWithAuthorization using that source’s chain id and USDC domain (a gasless signature — no transaction, no gas). Cross-chain entries carry extra.destinationChainId: 8453.
  3. Retry the same request with the signed payment base64-encoded in the X-PAYMENT header.
  4. The gateway settles through Meridian. Optimism and Ink payments enter bridging while Across delivers to Base. The gateway measures the exact Base credit and calls the merchant contract (deposit(buyer, net) for AntSeed) from its relayer wallet.
  5. The response (and GET /v1/antseed/topups/{id}) reports the source settlementTx, optional Base fillTx, Base depositTx, and exact credited amount.

Payment sources

SourceChain idUSDC EIP-712 name / versionSettlement
Base8453USD Coin / 2Same-chain
Optimism10USD Coin / 2Across to Base
Ink57073USDC / 2Across to Base

Rules worth knowing

  • Buyer = payer. v1 only allows self top-ups: the buyer must equal the address that signed the payment. Requests with a different buyer are rejected (buyer_mismatch).
  • Fee transparency. You pay a gross amount; the merchant contract is credited the amount net of Meridian facilitator and (when applicable) Across fees, always measured on Base — never assumed. Responses show both grossAmount and netAmount.
  • Idempotent. Replaying the same X-PAYMENT returns the existing top-up. Each EIP-3009 authorization (payer, nonce) is accepted exactly once.
  • Refund path. If the deposit can no longer succeed after settlement (e.g. credit limit lost to a concurrent deposit), the delivered amount is automatically refunded to the payer on Base. If an Across deposit itself expires, Meridian operations recover the source-proxy refund manually in v1.
The gateway is centralized execution, not custody of the merchant relationship: it holds funds only between settlement and fulfillment, and anyone could run a competing gateway against the same public merchant contract. The merchant protocol has no dependency on it.