# FreelanceDesk Invoice Preflight Check

> FreelanceDesk Invoice Preflight Check is a paid API for AI agents from afraid-butterfly-5236.obtranzat.deno.net, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-01).

Validates invoice JSON for correctness and returns computed totals (net, tax, total) before generating a PDF or HTML invoice

## Facts

- Endpoint: POST https://afraid-butterfly-5236.obtranzat.deno.net/v1/invoice/preflight?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/freelancedesk-invoice-preflight-check-a998a39b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QetoqN99uOx648UHjz29o

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 freelancedesk-invoice-preflight-check-a998a39b -d '<json body>'
```

Example prompt: Can you check this invoice before I generate the PDF — invoice number 2026-014, seller Acme Design, client Globex Corp, dated 2026-06-15, due 2026-07-15, with two line items: 10 hours of design at 80.00 EUR each with 21% VAT exclusive, and 1 logo package at 200.00 EUR with 21% VAT exclusive, currency EUR?

## When to prefer this

Use this endpoint when you need to validate invoice data and compute totals before committing to PDF or HTML generation (which cost more per call). It is the cheapest entry point in the FreelanceDesk pipeline and ideal as a dry-run or sanity-check step in an automated invoicing workflow. Prefer it over generating the full document when you want to catch errors early, preview tax calculations, or confirm line-item totals without incurring rendering costs.

## Known failure modes

- Invalid date format (not YYYY-MM-DD) returns validation error in findings
- Missing required seller or client name returns invalid result
- Unit price with more than 2 decimal places rejected
- Tax rate outside 0–100 range causes schema rejection
- Empty items array or more than 100 items returns error
- Malformed JSON body returns 400 Bad Request
- Payment not completed returns 402 Payment Required with x402/MPP challenge
- Unknown currency code may produce findings warning

## How this service works

Invoicing and billing resources sold per call to software. POST invoice JSON to check it (0.05 USD), get a print-ready A4 invoice as PDF (0.10 USD) or as self-contained HTML (0.10 USD), or GET the FreelanceDesk app and document pack as zip downloads. Each endpoint answers 402 with two payment options: an x402 v2 PAYMENT-REQUIRED challenge and an MPP WWW-Authenticate challenge (method evm, intent charge). Both settle an exact USDC EIP-3009 transfer on Base (eip155:8453) and return the resource in the same response.

## Output

A JSON object indicating whether the invoice is valid (boolean), the invoice number, computed totals (net, tax, total as decimal strings), the currency code, and an array of findings describing any validation errors or warnings found in the submitted data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string",
   "description": "Issue date, YYYY-MM-DD"
  },
  "items": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "description",
     "quantity",
     "unitPrice"
    ],
    "properties": {
     "taxRate": {
      "type": "number",
      "maximum": 100,
      "minimum": 0
     },
     "quantity": {
      "type": "number",
      "exclusiveMinimum": 0
     },
     "unitPrice": {
      "type": "string",
      "description": "Non-negative amount, max 2 decimals"
     },
     "description": {
      "type": "string"
     }
    }
   },
   "maxItems": 100,
   "minItems": 1
  },
  "notes": {
   "type": "string"
  },
  "client": {
   "type": "object",
   "required": [
    "name"
   ],
   "properties": {
    "name": {
     "type": "string"
    },
    "email": {
     "type": "string"
    },
    "vatId": {
     "type": "string"
    },
    "address": {
     "type": "string"
    }
   }
  },
  "number": {
   "type": "string",
   "description": "Invoice number, e.g. 2026-014"
  },
  "seller": {
   "type": "object",
   "required": [
    "name"
   ],
   "properties": {
    "name": {
     "type": "string"
    },
    "email": {
     "type": "string"
    },
    "vatId": {
     "type": "string"
    },
    "address": {
     "type": "string"
    }
   }
  },
  "dueDate": {
   "type": "string",
   "description": "Due date, YYYY-MM-DD"
  },
  "taxMode": {
   "enum": [
    "exclusive",
    "inclusive"
   ],
   "type": "string",
   "description": "default exclusive"
  },
  "currency": {
   "type": "string",
   "description": "ISO 4217 code, default EUR"
  },
  "taxLabel": {
   "type": "string",
   "description": "default VAT"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "valid": true,
  "number": "2026-014",
  "totals": {
   "net": "200.00",
   "tax": "42.00",
   "total": "242.00"
  },
  "currency": "EUR",
  "findings": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/freelancedesk-invoice-preflight-check-a998a39b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from afraid-butterfly-5236.obtranzat.deno.net](https://www.zero.xyz/host/afraid-butterfly-5236.obtranzat.deno.net/llms.txt)
