Skip to content
Fourohtwo

Payment header decoder and x402 payment header debugger

beggar-bot-demand.beggarbot.workers.dev/v1/payment-header

Payment header decoder and x402 payment header debugger: paste an X-PAYMENT (v1) or PAYMENT-SIGNATURE (v2) header, get the decoded payload, recovered EIP-3009 signer, time-window check and a field-by-field match against the 402 requirements - find out why a payment was rejected. Pure compute. Payment settles only after a successful (2xx) response; input errors are never charged.

BaseAnswering
POSThttps://beggar-bot-demand.beggarbot.workers.dev/v1/payment-header

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

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://beggar-bot-demand.beggarbot.workers.dev/v1/payment-header", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"header":"eyJ4NDAyVmVyc2lvbiI6MSwic2NoZW1lIjoiZXhhY3QiLCJuZXR3b3JrIjoiYmFzZSIsInBheWxvYWQiOnsic2lnbmF0dXJlIjoiMHhmOTU5MDRhZWMzNWZmOGRkYTM4ZGQwYmFmNGI4NTgzNzM4MDc1NmNjYWZiYjQ3ODJiODVmYTk2MzAyOTkwNGMxNDg5N2JlYWZiYTA5YzY1NmUwNWE1ZTMyNzRkNjhkODg3MjA2NDBhYmVlNWEyYjY2M2M2NjIxOWI1NTA3MTliNjFjIiwiYXV0aG9yaXphdGlvbiI6eyJmcm9tIjoiMHgxOUU3RTM3NkU3QzIxM0I3RTdlN2U0NmNjNzBBNWREMDg2REFmZjJBIiwidG8iOiIweDcxOTIyN),
});
console.log(await res.json());

Example input

{"header":"eyJ4NDAyVmVyc2lvbiI6MSwic2NoZW1lIjoiZXhhY3QiLCJuZXR3b3JrIjoiYmFzZSIsInBheWxvYWQiOnsic2lnbmF0dXJlIjoiMHhmOTU5MDRhZWMzNWZmOGRkYTM4ZGQwYmFmNGI4NTgzNzM4MDc1NmNjYWZiYjQ3ODJiODVmYTk2MzAyOTkwNGMxNDg5N2JlYWZiYTA5YzY1NmUwNWE1ZTMyNzRkNjhkODg3MjA2NDBhYmVlNWEyYjY2M2M2NjIxOWI1NTA3MTliNjFjIiwiYXV0aG9yaXphdGlvbiI6eyJmcm9tIjoiMHgxOUU3RTM3NkU3QzIxM0I3RTdlN2U0NmNjNzBBNWREMDg2REFmZjJBIiwidG8iOiIweDcxOTIyN