# code402 B2B Invoice Creator

> code402 B2B Invoice Creator 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).

Creates a verifiable B2B invoice with a payment URL for a business transaction, returning invoice ID, invoice URL, and pay URL via x402 micropayment protocol

## Facts

- Endpoint: POST https://hcrb.in/v1/tools/create-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-creator-da475ed5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T5MZPYukJoS7WIEXrhNfH

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-creator-da475ed5 -d '<json body>'
```

Example prompt: Create a B2B invoice for my merchant account for $250 USDC — I need an invoice URL and a payment link I can send to my client right away.

## When to prefer this

Choose this endpoint when you need to programmatically generate a B2B invoice with an attached crypto payment URL (USDC on Base) in a non-custodial, receipt-signed manner. Prefer this over traditional invoicing APIs when the payer is expected to settle in USDC via x402, or when you need a gasless EIP-3009 payment flow. Not suitable for fiat invoicing or when the counterparty cannot pay in USDC.

## Known failure modes

- Missing required fields (merchant, amount) returns a 400 error with validation details
- Payment not settled results in invoice remaining in unpaid state
- Invalid cart_hash causes invoice creation to fail
- x402 payment gateway unavailable causes a 402 or 503 response
- Exceeding free-tier (3 calls/day) without payment causes rejection until USDC micropayment is made

## 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 validity flag, unique invoice_id, a shareable invoice_url, a pay_url the payer can use to complete payment, amount_usdc, protocol_fee_usdc, cart_hash for integrity verification, merchant name, tool name, scope, and status string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "amount_usdc",
    "merchant"
   ],
   "properties": {
    "memo": {
     "type": "string",
     "description": "Engagement scope / milestone description (optional)."
    },
    "merchant": {
     "type": "string",
     "description": "Beneficiary contractor Base EVM wallet address (0x...)."
    },
    "referrer": {
     "type": "string",
     "description": "Optional attribution reference. Referral payouts and protocol fees are not active."
    },
    "amount_usdc": {
     "type": "number",
     "description": "Invoice total in USDC (e.g. 50000)."
    },
    "client_name": {
     "type": "string",
     "description": "Client enterprise organization name (optional)."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code402-b2b-invoice-creator-da475ed5/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)
