{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sophtron.com/agent-access-assets/agentic-web-execution-checkout-0.1.schema.json",
  "title": "Sophtron draft 0.1 \u2014 illustrative checkout request",
  "description": "Proposed request shape, not an existing Sophtron API contract. Schema validation does not authorize execution. The gateway independently verifies consent and obtains transaction-bound approval.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "profile",
    "request_id",
    "idempotency_key",
    "account_ref",
    "consent_ref",
    "operation",
    "parameters",
    "expires_at"
  ],
  "properties": {
    "profile": {
      "const": "sophtron.agentic-web-execution/0.1"
    },
    "request_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "idempotency_key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    },
    "account_ref": {
      "type": "string",
      "minLength": 1
    },
    "consent_ref": {
      "type": "string",
      "minLength": 1
    },
    "operation": {
      "const": "retail.order.submit"
    },
    "parameters": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "item_ref",
        "quantity",
        "max_total_minor",
        "currency",
        "fulfillment_ref"
      ],
      "properties": {
        "item_ref": {
          "type": "string",
          "minLength": 1
        },
        "quantity": {
          "type": "integer",
          "minimum": 1
        },
        "max_total_minor": {
          "type": "integer",
          "minimum": 0
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "fulfillment_ref": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
