# code402 B2B Invoice Lookup

> code402 B2B Invoice Lookup is a paid API for AI agents from hcrb.in, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Performs offline deterministic validation of a B2B invoice record, verifying its status, settlement details, and associated merchant/client data via a pay-per-call x402 USDC micropayment.

## Facts

- Endpoint: POST https://hcrb.in/v1/tools/get-b2b-invoice/call?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code402-b2b-invoice-lookup-d353428d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dkWkBg1ZZs_7S632B1em-

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 code402-b2b-invoice-lookup-d353428d -d '<json body>'
```

Example prompt: Can you look up invoice INV-20240501-883 and tell me whether it's been settled, who the merchant is, and how much USDC was paid?

## When to prefer this

Choose this endpoint when you need a fast, deterministic, offline lookup of a B2B invoice's validity and settlement status without relying on ML models or external scraping. Ideal for automated AP/AR workflows, audit trails requiring blockchain tx_hash receipts, or due-diligence pipelines that need cost-effective per-call pricing ($0.005 USDC). Prefer this over full ERP integrations when you only need lightweight invoice status checks with cryptographic receipt proof.

## Known failure modes

- Invoice ID not found — returns valid:false with a descriptive reason
- Malformed invoice_id format — validation error returned
- Payment failure via x402 — call not executed if USDC payment is rejected
- Rate limit exceeded beyond 3 free calls/day without payment — 402 response
- Network or settlement delay causing stale data

## How this service works

Offline deterministic checks (no ML, no scraping) for business identifiers and rental due-diligence, paid per call via x402 (gasless EIP-3009 USDC on Base). Checksum-verifiable (IBAN, LEI, VAT, ABA, ISBN, SEDOL…) vs format-only (EIN, IFSC, SWIFT/BIC…) — every response returns a scope field. Non-custodial, signed receipts. First 3 calls/day free.

## Output

Returns a JSON object with a boolean 'valid' field, the invoice_id, a status string (e.g. settled/pending), merchant name, client name, settlement timestamp (Unix), amount in USDC, and the blockchain tx_hash. A 'scope' field indicates whether the check was checksum-verifiable or format-only. Signed receipts are non-custodial.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "invoice_id"
   ],
   "properties": {
    "invoice_id": {
     "type": "string",
     "description": "Unique invoice identifier, e.g. inv_a1b2c3d4e5f6."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "valid",
   "invoice_id",
   "status"
  ],
  "properties": {
   "tool": {
    "type": "string"
   },
   "scope": {
    "type": "string"
   },
   "valid": {
    "type": "boolean"
   },
   "status": {
    "type": "string"
   },
   "tx_hash": {
    "type": "string"
   },
   "merchant": {
    "type": "string"
   },
   "invoice_id": {
    "type": "string"
   },
   "settled_at": {
    "type": "number"
   },
   "amount_usdc": {
    "type": "number"
   },
   "client_name": {
    "type": "string"
   }
  }
 },
 "example": {
  "valid": true,
  "reason": "checksum valid"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code402-b2b-invoice-lookup-d353428d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hcrb.in](https://www.zero.xyz/host/hcrb.in/llms.txt)
