{
  "openapi": "3.1.0",
  "info": {
    "title": "Church of Yahw.ai",
    "version": "1.0.0",
    "description": "An Oracle Consultation returns one randomly selected Teaching from the Canon. Completion is not fulfillment. No input analysis, factual verification, action authority, or guaranteed outcome. A Consultation is a service payment, separate from a voluntary Offering (not yet available). Existing result.reflection contains the Teaching. Agents can pay Bitcoin Lightning invoices using an authorized, funded wallet without browser checkout. Stripe card checkout is optional. Oracle is the sole launch mode. Request bodies are limited to 16 KiB.",
    "contact": {
      "name": "Senna Automation LLC",
      "email": "contact@senna-automation.com"
    },
    "termsOfService": "https://churchofyahw.ai/terms"
  },
  "servers": [
    {
      "url": "https://churchofyahw.ai"
    }
  ],
  "paths": {
    "/v1/capabilities": {
      "get": {
        "operationId": "getCapabilities",
        "summary": "Discover modes and limitations for free",
        "responses": {
          "200": {
            "description": "Public capability metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "service",
                    "modes",
                    "payments",
                    "input_analyzed"
                  ],
                  "properties": {
                    "service": {
                      "type": "string"
                    },
                    "modes": {
                      "type": "object"
                    },
                    "payments": {
                      "type": "object"
                    },
                    "input_analyzed": {
                      "const": false
                    },
                    "substantive_analysis": {
                      "const": false
                    },
                    "guaranteed": {
                      "const": false
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/v1/pricing": {
      "get": {
        "operationId": "getPricing",
        "summary": "Current fixed price and checkout availability",
        "responses": {
          "200": {
            "description": "Pricing; cached up to 30 seconds",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Money"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "payments_available": {
                          "type": "boolean"
                        },
                        "payment_environment": {
                          "enum": [
                            "test",
                            "live"
                          ]
                        },
                        "terms_version": {
                          "type": "string"
                        },
                        "one_time": {
                          "const": true
                        }
                      },
                      "required": [
                        "payments_available",
                        "terms_version",
                        "one_time"
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/quote": {
      "post": {
        "operationId": "createQuote",
        "summary": "Create or recover a free persistent quote; no payment initiated",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Secret random UUID or 32–128 URL-safe characters. Reuse only with identical body. Possession and body allow credential recovery.",
            "schema": {
              "type": "string",
              "minLength": 32,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mode"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "oracle"
                  },
                  "input": {
                    "description": "Any JSON. Defaults to {}. An optional question is not analyzed."
                  },
                  "context": {},
                  "instructions": {},
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Quote; save the secret quote_token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ask": {
      "post": {
        "operationId": "createRequest",
        "summary": "Create or recover a private paid or demo request",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Secret random UUID or 32–128 URL-safe characters. Reuse only with identical body. Possession and body allow credential recovery.",
            "schema": {
              "type": "string",
              "minLength": 32,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_-]+$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "mode"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "const": "oracle"
                  },
                  "input": {
                    "description": "Any JSON. Defaults to {}. An optional question is not analyzed."
                  },
                  "context": {},
                  "instructions": {},
                  "metadata": {
                    "type": "object",
                    "additionalProperties": true
                  },
                  "demo": {
                    "type": "boolean",
                    "default": false
                  },
                  "accepted_terms": {
                    "type": "string",
                    "description": "Required for paid requests.",
                    "const": "2026-09-16-church"
                  },
                  "quote_id": {
                    "type": "string"
                  },
                  "quote_token": {
                    "type": "string",
                    "description": "Required with quote_id; must match the quoted input."
                  }
                },
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Demo or existing terminal request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedRequest"
                }
              }
            }
          },
          "400": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Durable request created; payment required (not an error envelope)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedRequest"
                }
              }
            }
          },
          "404": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/{id}": {
      "get": {
        "operationId": "getRequest",
        "summary": "Retrieve private status and the same saved result",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^req_[a-f0-9]{32}$"
            }
          }
        ],
        "security": [
          {
            "requestToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Private request; poll every 3 seconds or slower",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Request"
                }
              }
            }
          },
          "400": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/{id}/checkout": {
      "post": {
        "operationId": "createCheckout",
        "summary": "Create or resume one hosted Stripe card checkout; requires authorized spending",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^req_[a-f0-9]{32}$"
            }
          }
        ],
        "security": [
          {
            "requestToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Open checkout_url in a browser; may require a human operator",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "checkout_url",
                    "expires_at"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "checkout_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/{id}/lightning": {
      "post": {
        "operationId": "createLightningInvoice",
        "summary": "Obtain or refresh a Bitcoin Lightning invoice under the same purchase",
        "description": "Requires an authorized, funded Lightning wallet. Pay the exact BOLT11 invoice before expires_at. Refresh an expired rate quote using this same request; do not create another purchase after an uncertain wallet response. Selecting Lightning prevents Stripe checkout for this request. No on-chain Bitcoin address is accepted.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^req_[a-f0-9]{32}$"
            }
          }
        ],
        "security": [
          {
            "requestToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "A short-lived BOLT11 invoice; pay through your own wallet API",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "provider",
                    "rail",
                    "network",
                    "invoice_id",
                    "bolt11",
                    "amount_sats",
                    "expires_at",
                    "verify_endpoint",
                    "requires_browser"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "provider": {
                      "const": "strike"
                    },
                    "rail": {
                      "const": "bitcoin_lightning"
                    },
                    "network": {
                      "enum": [
                        "mainnet",
                        "testnet"
                      ]
                    },
                    "invoice_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "bolt11": {
                      "type": "string",
                      "description": "Payable BOLT11 Lightning invoice. Never substitute an on-chain address."
                    },
                    "amount_sats": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "payment_window_ends_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "requires_browser": {
                      "const": false
                    },
                    "requires_funded_wallet": {
                      "const": true
                    },
                    "refresh_endpoint": {
                      "type": "string"
                    },
                    "verify_endpoint": {
                      "type": "string"
                    },
                    "result_endpoint": {
                      "type": "string"
                    },
                    "instructions": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/requests/{id}/lightning/verify": {
      "post": {
        "operationId": "verifyLightningPayment",
        "summary": "Refresh server-verified Bitcoin payment state and fulfill a settled invoice",
        "description": "Uses receiving-provider evidence, never caller-supplied proof. Calls are coalesced for five seconds per request. GET retrieval does not query the payment provider.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^req_[a-f0-9]{32}$"
            }
          }
        ],
        "security": [
          {
            "requestToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Current private request and any verified saved result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Request"
                }
              }
            }
          },
          "400": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Machine-readable error; 429 includes Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "responses": {
          "200": {
            "description": "Worker alive",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/ready": {
      "get": {
        "operationId": "ready",
        "summary": "Database and Canon readiness",
        "responses": {
          "200": {
            "description": "Ready; includes payments_available",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Degraded or unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "requestToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "The request-specific access_token returned by creation. Never put in URLs."
      }
    },
    "schemas": {
      "Money": {
        "type": "object",
        "required": [
          "amount",
          "amount_cents",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^[0-9]+\\.[0-9]{2}$"
          },
          "amount_cents": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "const": "USD"
          }
        }
      },
      "Quote": {
        "type": "object",
        "required": [
          "quote_id",
          "quote_token",
          "price",
          "expires_at",
          "purchase_description",
          "terms_version"
        ],
        "properties": {
          "quote_id": {
            "type": "string"
          },
          "quote_token": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "purchase_description": {
            "type": "string"
          },
          "terms_version": {
            "type": "string"
          },
          "terms_url": {
            "type": "string"
          },
          "guaranteed_result": {
            "const": false
          },
          "one_time": {
            "const": true
          }
        }
      },
      "Request": {
        "type": "object",
        "required": [
          "request_id",
          "status",
          "mode",
          "demo",
          "result",
          "meta",
          "price",
          "payment"
        ],
        "properties": {
          "request_id": {
            "type": "string"
          },
          "quote_id": {
            "type": "string"
          },
          "status": {
            "enum": [
              "payment_required",
              "payment_processing",
              "paid",
              "completed",
              "failed",
              "expired",
              "refunded"
            ]
          },
          "mode": {
            "const": "oracle"
          },
          "demo": {
            "type": "boolean"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "purchase_description": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "content_expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "content_expired": {
            "type": "boolean"
          },
          "result": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "required": [
                  "reflection",
                  "reflection_id",
                  "category"
                ],
                "properties": {
                  "reflection": {
                    "type": "string",
                    "description": "The exact delivered Teaching text, preserved for the retention period."
                  },
                  "reflection_id": {
                    "type": "string",
                    "description": "Teaching ID in the Canon. Legacy field name retained for compatibility."
                  },
                  "category": {
                    "type": "string",
                    "description": "Teaching theme; it is not selected by analyzing the input."
                  }
                }
              }
            ]
          },
          "meta": {
            "type": "object",
            "required": [
              "input_analyzed",
              "substantive_analysis",
              "guaranteed"
            ],
            "properties": {
              "input_analyzed": {
                "const": false
              },
              "substantive_analysis": {
                "const": false
              },
              "guaranteed": {
                "const": false
              },
              "professional_advice": {
                "const": false
              },
              "fulfillment_version": {
                "type": "string"
              }
            }
          },
          "payment": {
            "type": "object",
            "properties": {
              "provider": {
                "enum": [
                  "stripe",
                  "strike"
                ]
              },
              "available": {
                "type": "boolean"
              },
              "environment": {
                "enum": [
                  "test",
                  "live"
                ]
              },
              "checkout_endpoint": {
                "type": "string"
              },
              "checkout_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "selected_rail": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "stripe",
                  "lightning",
                  null
                ]
              },
              "requires_browser": {
                "type": "boolean"
              },
              "autonomous_payment": {
                "type": "boolean"
              },
              "bitcoin_lightning": {
                "type": "object",
                "properties": {
                  "available": {
                    "type": "boolean"
                  },
                  "invoice_endpoint": {
                    "type": "string"
                  },
                  "verify_endpoint": {
                    "type": "string"
                  },
                  "requires_browser": {
                    "const": false
                  },
                  "requires_funded_wallet": {
                    "const": true
                  }
                }
              }
            }
          },
          "poll_after_seconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "failure_code": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": true
      },
      "CreatedRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Request"
          },
          {
            "type": "object",
            "required": [
              "access_token"
            ],
            "properties": {
              "access_token": {
                "type": "string",
                "description": "Secret bearer credential; identical creation retries recover it."
              }
            }
          }
        ]
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "correlation_id"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "correlation_id": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}