{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/evictionsapi-com/json-schema/evictionsapi-com-customer-charge-schema.json",
  "title": "CustomerCharge",
  "description": "A charge on one of the organization's cases, as the billing page lists it: the case's id, the property's state and the case's landlord, and the charge as `GET /v1/cases/{id}/charges` shows it.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/evictionsapi-com-api-evictions-openapi.json#/components/schemas/CustomerCharge",
  "type": "object",
  "required": [
    "id",
    "caseId",
    "propertyState",
    "landlord",
    "kind",
    "description",
    "amountCents",
    "status",
    "collection",
    "paidAt",
    "receiptUrl",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "caseId": {
      "type": "string"
    },
    "propertyState": {
      "type": "string",
      "description": "Two-letter code of the property's state. Empty for a case whose details were erased."
    },
    "landlord": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "description": "The case's landlord (one of `GET /v1/landlords`, archived ones too) with its current name; null when the case has none."
    },
    "kind": {
      "enum": [
        "platform_fee",
        "court_costs",
        "service_costs",
        "other"
      ]
    },
    "description": {
      "type": "string"
    },
    "amountCents": {
      "type": "integer",
      "description": "US cents."
    },
    "status": {
      "enum": [
        "due",
        "paid",
        "void",
        "refunded"
      ]
    },
    "collection": {
      "enum": [
        "checkout",
        "automatic"
      ],
      "description": "As on `Charge`."
    },
    "paidAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "receiptUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "As on `Charge`."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}