{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/classquill-com/json-schema/classquill-com-payment-create-schema.json",
  "title": "PaymentCreate",
  "description": "POST /v1/payments → session_payments. MANUAL / EXTERNAL payments ONLY.\n\n`payment_type` is restricted to 'external' — this endpoint NEVER initiates a\nreal charge. Stripe/processor payment_types (single_session, group_session,\npackage_redemption) are rejected with 422 because the Python backend does not\nown money flows: a real charge must go through the Stripe PaymentIntent +\nwebhook that drives session_ledger. The referenced session/student/tutor must\nbe org-scoped.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/classquill-com-billing-api-openapi.yml#/components/schemas/PaymentCreate",
  "properties": {
    "session_id": {
      "type": "string",
      "title": "Session Id"
    },
    "student_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Student Id"
    },
    "tutor_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tutor Id"
    },
    "amount_cents": {
      "type": "integer",
      "minimum": 0.0,
      "title": "Amount Cents",
      "description": "Cents. Must be >= 0."
    },
    "currency": {
      "type": "string",
      "title": "Currency",
      "default": "aud"
    },
    "payment_type": {
      "type": "string",
      "title": "Payment Type",
      "description": "Only 'external' is accepted (manual/off-platform). Stripe types are rejected.",
      "default": "external"
    },
    "status": {
      "type": "string",
      "title": "Status",
      "description": "succeeded | pending | failed",
      "default": "succeeded"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "session_id",
    "amount_cents"
  ]
}