{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affiliaterail-com/json-schema/affiliaterail-com-balance-schema.json",
  "title": "Balance",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affiliaterail-com-balances-api-openapi.yml#/components/schemas/Balance",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "`bal_<partner_id>_<currency>`"
    },
    "object": {
      "type": "string",
      "enum": [
        "balance"
      ]
    },
    "partner_id": {
      "type": "string",
      "pattern": "^(sample_)?part_",
      "description": "Prefixed id (`part_…`)"
    },
    "currency": {
      "type": "string",
      "minLength": 3,
      "maxLength": 3,
      "description": "ISO-4217"
    },
    "pending_minor": {
      "type": "integer",
      "description": "Integer minor units (cents, pence). Never a float, never a string."
    },
    "due_minor": {
      "type": "integer",
      "description": "Integer minor units (cents, pence). Never a float, never a string."
    },
    "paid_minor": {
      "type": "integer",
      "description": "Integer minor units (cents, pence). Never a float, never a string."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "ISO-8601, UTC"
    }
  },
  "required": [
    "id",
    "object",
    "partner_id",
    "currency",
    "pending_minor",
    "due_minor",
    "paid_minor",
    "updated_at"
  ]
}