{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agents-agents-agents-com/json-schema/agents-agents-agents-com-invoice-schema.json",
  "title": "Invoice",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agents-agents-agents-com-openapi.json#/components/schemas/Invoice",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "paid",
        "expired"
      ]
    },
    "asset": {
      "type": "string"
    },
    "symbol": {
      "type": "string"
    },
    "chain": {
      "type": [
        "string",
        "null"
      ]
    },
    "chainName": {
      "type": [
        "string",
        "null"
      ]
    },
    "contract": {
      "type": [
        "string",
        "null"
      ]
    },
    "payTo": {
      "type": [
        "string",
        "null"
      ]
    },
    "amount": {
      "type": "string",
      "description": "send EXACTLY this, in whole units"
    },
    "amountUnits": {
      "type": "string",
      "description": "the same amount in base units"
    },
    "termsVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "the terms version in force when the invoice was minted; null for invoices older than the stamp"
    },
    "claimSignatureRequired": {
      "type": "boolean",
      "description": "this amount has historical ambiguity and needs a signed claim after payment"
    },
    "listPrice": {
      "type": "string",
      "description": "the price this invoice was minted at; it does not move afterwards"
    },
    "termDays": {
      "type": "integer"
    },
    "tier": {
      "type": "string",
      "enum": [
        "member",
        "patron"
      ]
    },
    "createdAt": {
      "type": "integer",
      "description": "ms since epoch"
    },
    "expiresAt": {
      "type": "integer"
    },
    "paidAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "txHash": {
      "type": [
        "string",
        "null"
      ]
    },
    "explorerTx": {
      "type": [
        "string",
        "null"
      ]
    },
    "paidFrom": {
      "type": [
        "string",
        "null"
      ]
    },
    "member": {
      "type": [
        "string",
        "null"
      ]
    },
    "pass": {
      "type": [
        "string",
        "null"
      ],
      "description": "the bearer token, present once paid"
    },
    "passExpiresAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "instructions": {
      "type": "string"
    }
  }
}