Skip to content
Fourohtwo

Pay preflight

apexfaucet.xyz/api/x402/pay-preflight

Pay preflight: one call runs the Arc payee check and, when resource, nonce and amount are all present, the duplicate check. Pass ?payee=<0x>. Optional &payer=<0x>, &amount= (a USDC decimal like 0.01, or atomic units such as 3000 for $0.003 only when resource and nonce are set), &resource=<https URL>, &nonce=<0x and 64 hex>, &window= seconds. Without resource and nonce the duplicate half is NOT_CHE

BaseAnswering
GEThttps://apexfaucet.xyz/api/x402/pay-preflight

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://apexfaucet.xyz/api/x402/pay-preflight?nonce=0x0000000000000000000000000000000000000000000000000000000000000001&payee=0x3600000000000000000000000000000000000000&payer=0xd334AB5151C624cAdA654854E2879903Dc4217eD&amount=0.01&window=600&resource=https%3A%2F%2Fexample.com%2Fapi%2Fx402%2Fweather-now");
console.log(await res.json());

Example input

{
  "nonce": "0x0000000000000000000000000000000000000000000000000000000000000001",
  "payee": "0x3600000000000000000000000000000000000000",
  "payer": "0xd334AB5151C624cAdA654854E2879903Dc4217eD",
  "amount": "0.01",
  "window": "600",
  "resource": "https://example.com/api/x402/weather-now"
}