x402 · USDC on Base + Solana

x402-confirmations

One canonical record, one ICS invite, one signature — from any merchant's confirmation JSON or a pasted confirmation email. Then buy signed status snapshots per query.

git clone https://github.com/nirholas/x402-confirmations && npm install && npm run dev

Pricing

RoutePriceWhat you get back
POST /track$0.005Normalized record + base64 RFC 5545 ICS invite + HMAC signature + ownerToken.
GET /status/:id$0.001Signed status snapshot: status, temporal, minutesUntilStart, full history.
POST /update/:idfreeOwner pushes a status change (cancelled/amended) with the ownerToken; returns the new snapshot.
GET /healthfreeLiveness.

How x402 works here

1 · 402

Request

Call a paid route. The server answers 402 Payment Required with an accepts array holding both rails.

2 · Sign

Pay

The 402 offers two rails — USDC on Base and USDC on Solana. Your client signs whichever one its wallet supports and retries with X-PAYMENT.

3 · Settle

Verify

That rail's facilitator verifies and settles on-chain. The server holds no key and pays no gas.

4 · 200

Artifact

The record + ICS, or the status snapshot, arrives in the response body; the receipt lands in X-PAYMENT-RESPONSE.

Quickstart

npm install && npm run dev                    # server on :4037, both rails live

# to receive the funds yourself:
export PAY_TO_ADDRESS=0xYourEvmWallet         # USDC on Base
export SOLANA_PAY_TO_ADDRESS=YourSolanaWallet # USDC on Solana

# agent side — pays $0.005, gets the record + ICS back
PRIVATE_KEY=0xAgentWallet npx tsx examples/agent-client.ts

Payment rails

RailNetworkAssetPays toFacilitator
EVMbase-sepolia (default) · baseUSDC0x40252CFDF8B20Ed757D61ff157719F33Ec332402x402.org/facilitator
Solanasolana (default) · solana-devnetUSDCWwwuGbqHrwF5RG89KhUbmRWEvjnRH9k5kVM5p7T3WwWfacilitator.payai.network

Both entries appear in every 402. Pay in USDC on Base or Solana — your client picks the rail. Set PAY_TO_ADDRESS / SOLANA_PAY_TO_ADDRESS to receive the funds yourself.

Pay-per-poll, not pay-and-wait

A confirmation's status changes over time, but nothing here is delivered later. POST /track returns the normalized record and its calendar invite immediately. GET /status/:id is a snapshot purchase: each $0.001 call buys the current state plus the full history delta, so an agent polls exactly as often as it cares and pays for exactly that. No webhooks, no subscription, no pending state.