{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/proxyai-app/json-schema/proxyai-app-checkout-schema.json",
  "title": "Checkout",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/proxyai-app-openapi.json#/components/schemas/Checkout",
  "type": "object",
  "required": [
    "id",
    "protocol",
    "status",
    "currency",
    "line_items",
    "totals",
    "created_at",
    "updated_at",
    "expires_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "protocol": {
      "type": "object",
      "required": [
        "version"
      ],
      "properties": {
        "version": {
          "type": "string"
        }
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "ready_for_payment",
        "not_ready_for_payment",
        "complete_in_progress",
        "requires_escalation",
        "authentication_required",
        "completed",
        "canceled",
        "expired"
      ]
    },
    "currency": {
      "type": "string",
      "const": "usd"
    },
    "line_items": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "item",
          "quantity",
          "totals"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "item": {
            "type": "object",
            "required": [
              "id",
              "name",
              "unit_amount"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "unit_amount": {
                "type": "integer",
                "minimum": 0,
                "description": "USD cents"
              }
            }
          },
          "quantity": {
            "type": "integer",
            "const": 1
          },
          "totals": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type",
                "display_text",
                "amount"
              ],
              "properties": {
                "type": {
                  "type": "string"
                },
                "display_text": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "USD cents"
                }
              }
            }
          }
        }
      }
    },
    "totals": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "type",
          "display_text",
          "amount"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "display_text": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "minimum": 0,
            "description": "USD cents"
          }
        }
      }
    },
    "fulfillment_options": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "totals": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type",
                "display_text",
                "amount"
              ],
              "properties": {
                "type": {
                  "type": "string"
                },
                "display_text": {
                  "type": "string"
                },
                "amount": {
                  "type": "integer",
                  "minimum": 0,
                  "description": "USD cents"
                }
              }
            }
          }
        }
      }
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "content_type": {
            "type": "string"
          },
          "content": {
            "type": "string"
          }
        }
      }
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "capabilities": {
      "type": "object",
      "description": "ACP payment handlers and supported interventions",
      "additionalProperties": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "continue_url": {
      "type": "string",
      "format": "uri"
    },
    "order": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "checkout_session_id": {
          "type": "string",
          "format": "uuid"
        },
        "permalink_url": {
          "type": "string",
          "format": "uri"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "metadata": {
      "type": "object",
      "description": "Checkout payment state, order ID and optional target bot ID",
      "additionalProperties": true
    }
  }
}