# Beggar Bot Payment Header Validator

> Beggar Bot Payment Header Validator is a paid API for AI agents from beggar-bot-demand.beggarbot.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-24).

Parses and validates an x402 payment header (X-PAYMENT or PAYMENT-SIGNATURE) against a set of payment requirements, returning structured validation results

## Facts

- Endpoint: POST https://beggar-bot-demand.beggarbot.workers.dev/v1/paymentheader?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/beggar-bot-payment-header-validator-7a5972f7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6hyaIZlYGUPYaZ6dAAGQM

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability beggar-bot-payment-header-validator-7a5972f7 -d '<json body>'
```

Example prompt: Check whether this base64 payment header is valid against these payment requirements — the header is 'eyJhbGci...' and the requirements say payTo 0x719227f384b66BFEF00093D6d8d32fA9dC2B40e7, maxAmountRequired 1000000 USDC on Base mainnet.

## When to prefer this

Use this endpoint when you need to locally validate or debug an x402 payment header before or after submitting it to a paid API — especially when building 402-gated services on Base mainnet with USDC. Prefer this over /v1/verify when you only need client-side header parsing without on-chain or receipt confirmation.

## Known failure modes

- Malformed or non-base64 header returns a parse error
- Header expired relative to provided or server-side timestamp
- Amount or payTo address does not match requirements
- Unsupported network or asset contract in header
- Missing required fields in the requirements object
- Invalid signature on the payment header

## How this service works

Decode an x402 X-PAYMENT / PAYMENT-SIGNATURE header, recover the EIP-3009 signer and match it against 402 requirements; explains facilitator rejections. Pure compute.

## Output

A JSON object indicating whether the payment header is valid, decoded header fields (payer, payee, amount, asset, chain, expiry, signature), and whether it satisfies the provided requirements (amount, payTo address, network, asset contract). May include error messages or field-level validation failures.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "now": {
   "type": "number",
   "description": "optional unix seconds"
  },
  "header": {
   "type": "string",
   "description": "base64 X-PAYMENT or PAYMENT-SIGNATURE value"
  },
  "requirements": {
   "type": "object",
   "description": "402 body / PAYMENT-REQUIRED header / accepts[]"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/beggar-bot-payment-header-validator-7a5972f7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from beggar-bot-demand.beggarbot.workers.dev](https://www.zero.xyz/host/beggar-bot-demand.beggarbot.workers.dev/llms.txt)
