x402 payments,
drop-in.

One <script> tag. A clean modal. Stablecoin payments on Base and Solana, settled on-chain in seconds. No keys, no signup, no SDK to learn. Built on the x402 protocol.

Settles on Base mainnet · USDC Solana mainnet · USDC

01Install

Paste one line into your <head>. Then add data-x402-endpoint to any button. That's it.

<!-- 1. Load once --> <script type="module" src="https://three.ws/x402.js"></script> <!-- 2. Add a button to any 402-paid endpoint --> <button data-x402-endpoint="https://three.ws/api/x402/symbol-availability?ticker=AGENT" data-x402-merchant="three.ws" data-x402-action="Check ticker availability"> Check AGENT availability · $0.001 USDC </button>

02How it works

x402 is HTTP 402 Payment Required, with a manifest. The drop-in handles the entire dance — you never see it.

1

Buyer clicks

The modal opens. We probe your endpoint, parse the 402 challenge, and show the price + network.

2

Wallet signs

Phantom for Solana, MetaMask/Coinbase for Base. We build the SPL transfer or EIP-3009 authorization. One click.

3

Facilitator settles

PayAI or Coinbase CDP verifies and broadcasts the tx on-chain. Your endpoint runs and returns the result.

03Try it live

These are real paid endpoints. Pay $0.001 USDC with Phantom or your browser wallet and see the response stream back.

Symbol availability
$0.001
Check if a token ticker is already trading across Solana and Base. Returns exact matches, fuzzy lookalikes, and a register/skip recommendation.
Base · Solana
Agent reputation
$0.001
Pull a multi-source reputation report for any on-chain agent: posting cadence, follower deltas, on-chain activity, x402 settlement stats.
Base · Solana
Pump.fun agent audit
$0.001
Forensic on-chain audit of a Pump.fun launch — supply curves, holder concentration, dev-wallet history, and risk flags.
Base · Solana
Onchain identity verify
$0.001
Verify an address claim against ENS, SNS, ERC-8004 attestations, and Solana SAS credentials. Returns linked identities + provenance.
Base · Solana

04Sign in with wallet (re-entry)

For re-downloadable content — GLBs, avatars, agent skills, lobby characters — buyers shouldn't pay again every time they fetch the same asset. When an endpoint opts into SIWX (Sign-In-With-X, CAIP-122), the modal grows a second option:

┌──────────────────────────────────────────┐
│  three.ws                              ✕ │
│  Download pole-dancer-rumba.glb          │
├──────────────────────────────────────────┤
│  0.05 USDC          [Base · live ●]      │
├──────────────────────────────────────────┤
│  ┌────────────────────────────────────┐  │
│  │       Sign in with wallet          │  │   ← primary
│  └────────────────────────────────────┘  │
│  ┌────────────────────────────────────┐  │
│  │     Pay 0.05 USDC instead          │  │   ← secondary
│  └────────────────────────────────────┘  │
│  Already paid for this once? Sign in to  │
│  re-enter without paying again.          │
└──────────────────────────────────────────┘

Click Sign in with wallet → wallet pops with a CAIP-122 message naming the resource, the connected address, and a fresh nonce → modal posts the signed payload as a SIGN-IN-WITH-X header → endpoint looks the wallet up in its payment ledger → returns 200 without charging. If the wallet hasn't actually paid for this resource (or the signature is rejected), the modal falls back to the normal pay flow with a one-line notice.

Programmatic callers see the same flow: await window.X402.pay(...) resolves with { result, siwx: { address, network } } (instead of payment) when SIWX was used. The element-bound API also dispatches an x402:siwx-signed event right before x402:result so analytics can distinguish a sign-in from a paid call. A manual test surface lives at /siwx-test.html.

05Or call it programmatically

Same modal, called from JavaScript. The promise resolves with the API result and a settlement receipt.

const { result, payment } = await window.X402.pay({ endpoint: '/api/x402/symbol-availability', body: { ticker: 'AGENT' }, merchant: 'Acme', action: 'Check ticker', }); // payment.transaction → on-chain tx hash // payment.payer → buyer wallet // result → your endpoint's JSON response
copied