{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/studiomeyer-academy/json-schema/studiomeyer-academy-payment-readiness-schema.json",
  "title": "PaymentReadiness",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/studiomeyer-academy-openapi.json#/components/schemas/PaymentReadiness",
  "type": "object",
  "properties": {
    "protocol": {
      "type": "string",
      "const": "acp"
    },
    "api_version": {
      "type": "string",
      "const": "2026-04-17"
    },
    "endpoint": {
      "type": "string",
      "format": "uri"
    },
    "specification": {
      "type": "string",
      "format": "uri"
    },
    "openapi": {
      "type": "string",
      "format": "uri"
    },
    "offers": {
      "type": "string",
      "format": "uri"
    },
    "payment_mode": {
      "type": "string",
      "const": "human_hosted_checkout"
    },
    "status": {
      "type": "string",
      "enum": [
        "awaiting_approved_offers",
        "configuration_required",
        "configured"
      ]
    },
    "purchases_enabled": {
      "type": "boolean"
    },
    "approved_offer_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "readiness_basis": {
      "type": "string",
      "const": "configuration_only"
    },
    "blocked_by": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "approved_offers",
          "payment_provider",
          "durable_store"
        ]
      }
    },
    "human_confirmation_required": {
      "type": "boolean",
      "const": true
    },
    "delegated_payment": {
      "type": "boolean",
      "const": false
    },
    "authentication": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "oauth2_bearer"
        },
        "resource": {
          "type": "string",
          "format": "uri"
        },
        "read_scopes": {
          "type": "array",
          "items": {
            "type": "string",
            "const": "learn:read"
          }
        },
        "write_scopes": {
          "type": "array",
          "items": {
            "type": "string",
            "const": "credits:spend"
          }
        },
        "cookies_authorize_checkout": {
          "type": "boolean",
          "const": false
        }
      },
      "required": [
        "type",
        "resource",
        "read_scopes",
        "write_scopes",
        "cookies_authorize_checkout"
      ],
      "additionalProperties": false
    },
    "required_mutation_headers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "operations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST"
            ]
          },
          "path": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "method",
          "path"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "protocol",
    "api_version",
    "endpoint",
    "specification",
    "openapi",
    "offers",
    "payment_mode",
    "status",
    "purchases_enabled",
    "approved_offer_count",
    "readiness_basis",
    "blocked_by",
    "human_confirmation_required",
    "delegated_payment",
    "authentication",
    "required_mutation_headers",
    "operations"
  ],
  "additionalProperties": false
}