Invoice Validation

Check an invoice's data: VAT number format, line item arithmetic, tax calculations and EU invoice requirements.

Pay by wallet (x402) invoice-validate

Example

Example answer
{
  "valid": false,
  "errors": [
    {
      "field": "invoice_number",
      "issue": "Required field 'invoice_number' is missing."
    },
    {
      "field": "invoice_date",
      "issue": "Required field 'invoice_date' is missing."
    },
    {
      "field": "vendor_vat",
      "issue": "Required field 'vendor_vat' is missing."
    },
    {
      "field": "vendor_name",
      "issue": "Required field 'vendor_name' is missing."
    },
    {
      "field": "vendor_address",
      "issue": "Required field 'vendor_address' is missing."
    },
    {
      "field": "line_items",
      "issue": "Required field 'line_items' is missing."
    },
    {
      "field": "amounts",
      "issue": "Required field 'amounts' is missing."
    }
  ],
  "warnings": [
    {
      "field": "buyer_name",
      "issue": "Recommended field 'buyer_name' is missing for full EU compliance."
    },
    {
      "field": "buyer_vat",
      "issue": "Recommended field 'buyer_vat' is missing for full EU compliance."
    },
    {
      "field": "buyer_address",
      "issue": "Recommended field 'buyer_address' is missing for full EU compliance."
    },
    {
      "field": "due_date",
      "issue": "Recommended field 'due_date' is missing for full EU compliance."
    },
    {
      "field": "currency",
      "issue": "Recommended field 'currency' is missing for full EU compliance."
    }
  ],
  "eu_compliant": false,
  "line_items_check": {
    "failed": 0,
    "passed": 0,
    "total_checked": 0
  },
  "tax_calculation_check": {
    "pass": true,
    "actual_tax": null,
    "difference": null,
    "expected_tax": null
  }
}

Inputs

FieldTypeRequiredWhat it is
invoiceobjectYesInvoice JSON with vendor_vat, buyer_vat, amounts, line_items

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
validbooleanAlways (present in every successful answer)
errorsarrayAlways (present in every successful answer)
warningsarrayAlways (present in every successful answer)
eu_compliantbooleanAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "invoice-validate",
    "inputs": {
      "invoice": {
        "invoice_number": "2026-0042",
        "invoice_date": "2026-03-01",
        "due_date": "2026-03-31",
        "vendor_vat": "SE556036079301",
        "vendor_name": "Ericsson AB",
        "vendor_address": "Torshamnsgatan 21, 164 40 Kista, Sweden",
        "buyer_vat": "SE556703096301",
        "buyer_name": "Spotify AB",
        "buyer_address": "Regeringsgatan 19, 111 53 Stockholm, Sweden",
        "currency": "EUR",
        "line_items": [
          {
            "description": "Consulting services",
            "quantity": 10,
            "unit_price": 150,
            "line_total": 1500
          },
          {
            "description": "Travel expenses",
            "quantity": 1,
            "unit_price": 350,
            "line_total": 350
          }
        ],
        "amounts": {
          "subtotal": 1850,
          "tax_rate": 0.25,
          "tax_amount": 462.5,
          "total": 2312.5
        }
      }
    },
    "max_price_cents": 2
  }'

Limitations

  • Delivery and contract prices are not verified

    Validates invoice structure and arithmetic — cannot verify that billed items were actually delivered or that prices match contracts

    What to do instead: Use as a structural pre-check before manual review of business terms and delivery confirmation