Pay for an API call with one signature
This page is a real x402 buyer and the Arclight API is a real x402 seller. The payment settles on Arc through the same facilitator any server can point at. Read how to use it.
Arcloak (arcloak.net) sells per-token inference through this facilitator with the upto scheme.
Call /v1/x402/demo. The seller answers 402; you sign one USDC authorization.
Every claim on this page has a transaction behind it.
A signed authorization straight to the facilitator.
0x39ef37ab…e6279f31The browser flow above, end to end through the Arclight API.
0x835fb119…09d6d8ffA NEAR account paid, signing through the MPC network.
0xe47a93d1…66536619Same payment, no browser.
The page above is one buyer. Any process with a key can be another: it reads the 402, signs one USDC authorization and asks again. The facilitator settles it on Arc and pays the gas.
- An EVM key holding USDC, or EURC, on Arc (chain id 5042, RPC https://rpc.mainnet.arc.io). Nothing else: no native gas, no approval, no deposit.
- A seller whose 402 lists network eip155:5042. The Arclight API demo above is one, priced at 0.001 USDC per call.
- Nothing from us. The facilitator has no keys, no signup and no allowlist; the seller points at it, you never call it.
Full reference: docs / x402 facilitator. Machine-readable: x402.arclight.finance/supported.
import { wrapFetchWithPayment, x402Client } from '@x402/fetch'
import { ExactEvmScheme } from '@x402/evm/exact/client'
import { privateKeyToAccount } from 'viem/accounts'An agent on NEAR can pay too.
NEAR's MPC network controls one root key and signs for a derived key only when the call comes from the NEAR account that derives it. So a NEAR account can spend USDC at an Arc address that no private key anywhere corresponds to.
Worked out in your browser, with no request to us and none to NEAR. Fund the address it gives you and that NEAR account can spend it through the facilitator.