{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentaos-ai/json-schema/agentaos-ai-grant-credit-request-schema.json",
  "title": "GrantCreditRequest",
  "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/GrantCreditRequest",
  "type": "object",
  "properties": {
    "amountMinor": {
      "type": "integer",
      "minimum": 1,
      "description": "Positive integer minor units of the subscription's currency, at most the next invoice's amount due. There is no currency field: a credit in the wrong currency is accepted by the processor and then never reaches an invoice."
    },
    "reason": {
      "type": "string",
      "maxLength": 200,
      "description": "Why you gave it. Shown back to you and on the credit at the processor."
    }
  },
  "required": [
    "amountMinor",
    "reason"
  ]
}