{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audiopod-ai/json-schema/audiopod-ai-pay-as-you-go-payment-intent-request-schema.json",
  "title": "PayAsYouGoPaymentIntentRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audiopod-ai-credits-api-openapi.yml#/components/schemas/PayAsYouGoPaymentIntentRequest",
  "properties": {
    "amount_usd": {
      "type": "integer",
      "multipleOf": 5.0,
      "maximum": 1000.0,
      "minimum": 5.0,
      "title": "Amount Usd",
      "description": "Amount in USD to purchase (minimum $5, maximum $1000, multiples of $5)"
    },
    "audiobook_context": {
      "anyOf": [
        {
          "$ref": "#/$defs/AudiobookCheckoutContext"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional: the audiobook this purchase funds. Recorded with the payment; the book starts once your balance covers it."
    }
  },
  "type": "object",
  "required": [
    "amount_usd"
  ],
  "$defs": {
    "AudiobookCheckoutContext": {
      "properties": {
        "project_id": {
          "type": "string",
          "format": "uuid",
          "title": "Project Id"
        },
        "approval_id": {
          "type": "string",
          "format": "uuid",
          "title": "Approval Id"
        },
        "pending_start_id": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pending Start Id"
        }
      },
      "type": "object",
      "required": [
        "project_id",
        "approval_id"
      ],
      "title": "AudiobookCheckoutContext",
      "description": "Optional: the audiobook a checkout is funding. Copied into the\npayment's metadata as a routing and analytics hint -- never authority.\nThe book starts because the balance covers it, not because of this."
    }
  }
}