# BRAINIAC Invoice Discounting Calculator

> BRAINIAC Invoice Discounting Calculator is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.04/call, status unknown (last checked 2026-11-12).

Calculates invoice discounting proceeds, discount amounts, and tenor for trade finance invoices without making credit decisions or inventing data.

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/trade-finance/invoice-discounting-calculate?utm_source=zero.xyz
- Price: $0.04/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-invoice-discounting-calculator-0e5c3b99
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s8RBmdDwSSr0v7ZGDkWQl

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 brainiac-invoice-discounting-calculator-0e5c3b99 -d '<json body>'
```

Example prompt: Calculate the discounting proceeds for my invoice INV-1001 with a face amount of $100,000 due in 90 days from today using a 6% annual discount rate — tell me how much I'll actually receive and what the discount amount is.

## When to prefer this

Use this endpoint when you need deterministic, auditable invoice discounting math — proceeds, discount amount, and tenor — without needing a credit decision or live bank data. It is ideal for pre-submission verification, internal finance calculations, or agent workflows that need to present discounting figures to a human. Prefer this over generic calculators when you have structured invoice data with explicit fields and want per-invoice line-item results with discrepancy detection. It does not contact banks, invent missing values, or require API keys beyond the x402 USDC micropayment.

## Known failure modes

- Missing required invoice fields (amount, dueDate, currency) result in amountInvented or incomplete calculations
- Invoices with missing discount rate may not compute discount figures
- Overly large payloads exceeding maxItems:1000 or maxLength:200000 may be rejected
- Malformed date strings in dueDate or issueDate fields may cause parsing errors
- No actual credit or financing decision is ever returned — agents expecting approval/rejection will not get one

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON array of per-invoice calculation results including: proceeds (net amount received), discount amount, discount rate percentage, tenor days, face amount, due date, currency, and boolean flags indicating which fields were supplied vs. invented. Also includes a top-level status, findings array for discrepancies, limitations list, and metadata flags confirming no credit decision, no paid provider, and no invented amounts were used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "csv": {
   "type": "string",
   "maxLength": 200000
  },
  "asOf": {
   "type": "string",
   "maxLength": 40
  },
  "file": {
   "type": "object",
   "required": [
    "mediaType",
    "fileBase64"
   ],
   "properties": {
    "filename": {
     "type": "string",
     "maxLength": 180,
     "minLength": 1
    },
    "mediaType": {
     "enum": [
      "text/plain",
      "text/csv",
      "application/json"
     ],
     "type": "string"
    },
    "fileBase64": {
     "type": "string",
     "maxLength": 12000000,
     "minLength": 1
    }
   },
   "additionalProperties": false
  },
  "json": {
   "type": "string",
   "maxLength": 200000
  },
  "text": {
   "type": "string",
   "maxLength": 200000
  },
  "parties": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 80
     },
     "name": {
      "type": "string",
      "maxLength": 200
     },
     "role": {
      "type": "string",
      "maxLength": 80
     },
     "country": {
      "type": "string",
      "maxLength": 80
     }
    },
    "additionalProperties": false
   },
   "maxItems": 200
  },
  "invoices": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "maxLength": 80
     },
     "lcId": {
      "type": "string",
      "maxLength": 80
     },
     "buyer": {
      "type": "string",
      "maxLength": 200
     },
     "goods": {
      "type": "string",
      "maxLength": 400
     },
     "amount": {
      "type": "number",
      "maximum": 1000000000000,
      "minimum": 0
     },
     "number": {
      "type": "string",
      "maxLength": 80
     },
     "seller": {
      "type": "string",
      "maxLength": 200
     },
     "source": {
      "type": "string",
      "maxLength": 160
     },
     "status": {
      "type": "string",
      "maxLength": 80
     },
     "country": {
      "type": "string",
      "maxLength": 80
     },
     "dueDate": {
      "type": "string",
      "maxLength": 40
     },
     "currency": {
      "type": "string",
      "maxLength": 12
     },
     "incoterm": {
      "type": "string",
      "maxLength": 40
     },
     "issueDate": {
      "type": "string",
      "maxLength": 40
     },
     "contractId": {
      "type": "string",
      "maxLength": 80
     },
     "outstanding": {
      "type": "number",
      "maximum": 1000000000000,
      "minimum": 0
     },
     "pay
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "asOf": "2026-10-01",
    "dueDate": "2026-12-30",
    "currency": "USD",
    "proceeds": 98500,
    "invoiceId": "INV-1",
    "tenorDays": 90,
    "faceAmount": 100000,
    "invoiceNumber": "INV-1001",
    "amountInvented": false,
    "creditDecision": false,
    "discountAmount": 1500,
    "discountRatePct": 6,
    "proceedsSupplied": true,
    "financingApproved": false,
    "tenorDaysSupplied": true,
    "faceAmountSupplied": true,
    "discountRateSupplied": true,
    "discountAmountSupplied": true
   },
   {
    "asOf": "2026-10-01",
    "dueDate": "2026-11-15",
    "currency": "USD",
    "proceeds": 49625,
    "invoiceId": "INV-2",
    "tenorDays": 45,
    "faceAmount": 50000,
    "invoiceNumber": "INV-1002",
    "amountInvented": false,
    "creditDecision": false,
    "discountAmount": 375,
    "discountRatePct": 6,
    "proceedsSupplied": true,
    "financingApproved": false,
    "tenorDaysSupplied": true,
    "faceAmountSupplied": true,
    "discountRateSupplied": true,
    "discountAmountSupplied": true
   }
  ],
  "status": "calculated",
  "findings": [],
  "checkedAt": "2026-11-04T21:00:00.000Z",
  "limitations": [
   "Invoices, contracts, letters of credit, trade documents, and assignments are copied only from labeled fields supplied by the caller, or from key-free public World Bank trade responses when requested.",
   "No paid trade-finance data provider is used and no API key is required.",
   "Missing amounts, due dates, parties, and document fields are not invented.",
   "Financing readiness and discounting figures are descriptive calculations only. A credit or financing decision is never produced.",
   "Discrepancy and conflict findings compare supplied fields only and do not contact banks or registries."
  ],
  "invoiceCount": 2,
  "publicSources": [],
  "amountInvented": false,
  "apiKeyRequired": false,
  "creditDecision": false,
  "paidProviderUsed": false,
  "financingApproved": false,
  "discrepancyInvented": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-invoice-discounting-calculator-0e5c3b99/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
