{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentaos-ai/json-schema/agentaos-ai-subscription-credit-list-response-schema.json",
  "title": "SubscriptionCreditListResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentaos-ai-subscriptions-api-openapi.yml#/components/schemas/SubscriptionCreditListResponse",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "amountMinor": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          },
          "createdBy": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "The id of the person who gave it. Null when the credit was not given through AgentaOS but directly at the card processor, so there is nobody of ours to name."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "amountMinor",
          "reason",
          "createdBy",
          "createdAt"
        ]
      }
    },
    "balanceMinor": {
      "type": "integer",
      "description": "Unspent credit on the CUSTOMER, which may span their subscriptions with you."
    },
    "currency": {
      "type": "string",
      "description": "What every minor-unit figure on this page is counted in — the subscription's own currency, lower-case ISO 4217. Print it; don't assume one."
    }
  },
  "required": [
    "items",
    "balanceMinor",
    "currency"
  ]
}