{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentpmt-com/json-schema/agentpmt-com-customer-credit-balance-response-schema.json",
  "title": "CustomerCreditBalanceResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentpmt-com-credits-api-openapi.yml#/components/schemas/CustomerCreditBalanceResponse",
  "properties": {
    "success": {
      "type": "boolean",
      "title": "Success",
      "description": "`true` when the balance lookup succeeded.",
      "default": true
    },
    "message": {
      "type": "string",
      "title": "Message",
      "description": "Human-readable status message.",
      "default": "Credit balance retrieved successfully"
    },
    "data": {
      "$ref": "#/$defs/CustomerCreditBalanceData"
    }
  },
  "type": "object",
  "required": [
    "data"
  ],
  "$defs": {
    "CustomerCreditBalanceData": {
      "properties": {
        "balance": {
          "type": "integer",
          "title": "Balance",
          "description": "Current available credit balance, in whole credits (100 credits = $1)."
        },
        "expiration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expiration",
          "description": "ISO-8601 timestamp of the next credit expiration, or null when the balance is zero."
        },
        "expires_in_days": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Expires In Days",
          "description": "Whole days until the next expiration, or null when the balance is zero."
        }
      },
      "type": "object",
      "required": [
        "balance"
      ],
      "title": "CustomerCreditBalanceData"
    }
  }
}