{
  "x402Version": 2,
  "name": "GAS Invoice Verify",
  "description": "Verify an invoice before payment: check invoice consistency and validate invoice totals and VAT/tax arithmetic from structured data. Returns pass/review/fail and a deterministic fingerprint for caller-side comparison across invoices. No historical duplicate lookup, OCR, official tax validation, or comprehensive fraud detection.",
  "resources": [
    {
      "url": "https://gas-ventures.vercel.app/api/outcome-001/verify-invoice",
      "method": "POST",
      "type": "http",
      "mimeType": "application/json",
      "protocol": "x402",
      "payment": {
        "scheme": "exact",
        "price": "$0.05",
        "asset": "USDC",
        "network": "eip155:8453",
        "networkName": "Base mainnet",
        "payTo": "0xefe53db6fa3f752b0c14766fa3912d36883da233"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "supplier_id": {"type": "string", "description": "Optional supplier reference."},
          "customer_id": {"type": "string", "description": "Optional customer reference."},
          "invoice_number": {"type": "string", "description": "Invoice identifier."},
          "date": {"type": "string", "format": "date", "description": "Invoice date, YYYY-MM-DD."},
          "net": {"type": "number", "description": "Net amount before VAT."},
          "vat_rate": {"type": "number", "description": "VAT percentage, for example 21 for 21%."},
          "vat_amount": {"type": "number", "description": "Declared VAT amount."},
          "total": {"type": "number", "description": "Declared gross total."},
          "currency": {"type": "string", "description": "Currency code; defaults to EUR."}
        },
        "required": ["invoice_number", "date", "net", "vat_rate", "vat_amount", "total"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "outcome": {"type": "string", "const": "invoice_verification"},
          "decision": {"type": "string", "enum": ["pass", "review", "fail"]},
          "confidence": {"type": "number"},
          "checks": {"type": "object"},
          "issues": {"type": "array", "items": {"type": "object"}},
          "duplicate_fingerprint": {"type": "string"}
        },
        "required": ["outcome", "decision", "confidence", "checks", "issues", "duplicate_fingerprint"]
      },
      "example": {
        "request": {"supplier_id":"TEST-SUPPLIER","customer_id":"TEST-CUSTOMER","invoice_number":"TEST-001","date":"2026-09-23","net":100,"vat_rate":21,"vat_amount":21,"total":121,"currency":"EUR"},
        "response": {"api":"gas-outcome","version":"0.1","outcome":"invoice_verification","decision":"pass","confidence":0.98,"normalized":{"supplier":"UNKNOWN","invoice_number":"TEST-001","date":"2026-09-23","currency":"EUR","net":100,"vat_rate":21,"vat_amount":21,"total":121},"checks":{"expected_vat":21,"expected_total":121},"duplicate_fingerprint":"UNKNOWN|TEST-001|2026-09-23|121","issues":[],"disclaimer":"Arithmetic/document consistency check only; not tax or accounting advice."}
      },
      "documentation": "https://gas-ventures.vercel.app/skill.md",
      "openapi": "https://gas-ventures.vercel.app/openapi.json",
      "tags": ["invoice", "invoice-verification", "invoice-validation", "pre-payment-check", "invoice-consistency", "invoice-totals", "vat", "vat-calculation", "tax", "duplicate-fingerprint", "accounting", "agents"]
    }
  ]
}
