{
  "openapi": "3.1.0",
  "info": {
    "title": "Take A Coffee",
    "version": "1.0.0",
    "description": "Agent-readable download and payment surface for Take A Coffee."
  },
  "servers": [
    {
      "url": "https://takeacoffee.club"
    }
  ],
  "paths": {
    "/agent.json": {
      "get": {
        "summary": "Get the agent manifest",
        "operationId": "getAgentManifest",
        "responses": {
          "200": {
            "description": "Agent manifest",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/takeacoffee/checkout": {
      "get": {
        "summary": "Open embedded Stripe checkout",
        "operationId": "openEmbeddedCheckout",
        "responses": {
          "200": {
            "description": "HTML page with embedded Stripe Checkout",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/takeacoffee/embedded-session": {
      "post": {
        "summary": "Create an embedded Stripe Checkout session",
        "operationId": "createEmbeddedCheckoutSession",
        "responses": {
          "200": {
            "description": "Embedded Checkout session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "publishableKey": { "type": "string" },
                    "clientSecret": { "type": "string" },
                    "sessionId": { "type": "string" }
                  },
                  "required": ["publishableKey", "clientSecret", "sessionId"]
                }
              }
            }
          }
        }
      }
    },
    "/takeacoffee/download": {
      "get": {
        "summary": "Download the Take A Coffee install package",
        "operationId": "downloadTakeACoffee",
        "responses": {
          "302": {
            "description": "Redirects to the ZIP package"
          },
          "200": {
            "description": "ZIP package",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "contentEncoding": "binary"
                }
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Embedded Stripe checkout for $1 lifetime access",
    "url": "https://takeacoffee.club/takeacoffee/checkout"
  }
}
