Skip to content
Fourohtwo

beggar-bot-demand.beggarbot.workers.dev/v1/x402check

Validate an x402 402 challenge / PAYMENT-REQUIRED header / accepts[]: scheme, network, atomic amount, payTo checksum, USDC asset, EIP-712 extra.name/version, timeouts. Pure compute.

BaseUnchecked
POSThttps://beggar-bot-demand.beggarbot.workers.dev/v1/x402check

UptimeNot checked yet

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://beggar-bot-demand.beggarbot.workers.dev/v1/x402check", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"challenge":{"accepts":[{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","extra":{"name":"USD Coin","version":"2"},"payTo":"0x719227f384b66BFEF00093D6d8d32fA9dC2B40e7","scheme":"exact","network":"base","maxAmountRequired":"20000","maxTimeoutSeconds":120}],"x402Version":1}}),
});
console.log(await res.json());

Example input

{
  "challenge": {
    "accepts": [
      {
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "extra": {
          "name": "USD Coin",
          "version": "2"
        },
        "payTo": "0x719227f384b66BFEF00093D6d8d32fA9dC2B40e7",
        "scheme": "exact",
        "network": "base",
        "maxAmountRequired": "20000",
        "maxTimeoutSeconds": 120
      }
    ],
    "x402Version": 1
  }
}