{
  "schema_version": "1.0",
  "name": "The Bitcoin Finance — Kai & Koa Sustainable Fashion",
  "description": "Kai & Koa — Sustainable Swimwear & Fitwear, ethically handmade in Portugal & Spain with exclusive recycled Italian fabrics. Accepting Bitcoin Lightning payments. Worldwide shipping.",
  "url": "https://thebitcoinfinance.com",
  "merchant_id": "kai-and-koa",
  "logo": "https://kaikoaworld.com/cdn/shop/files/IMG_3443_1_2409c7d7-38af-4ed9-9c2f-b96628368261_1200x1200.jpg?v=1630579005",

  "capabilities": {
    "browsing": true,
    "checkout": true,
    "invoice_status": true,
    "lightning_payments": true,
    "onchain_payments": true
  },

  "endpoints": {
    "catalog": {
      "url": "/api/merchants/kai-and-koa/products",
      "method": "GET",
      "description": "Browse all Kai & Koa products with real-time sats pricing. Supports ?category=, ?max_price=, ?in_stock=true filters.",
      "returns": "{ merchant_id, products: [{ id, name, description, price, currency, priceSats, category, inStock }], total }"
    },
    "checkout": {
      "url": "/api/merchants/kai-and-koa/checkout",
      "method": "POST",
      "description": "Create a payment invoice for a specific product. Returns bolt11 BOLT11 Lightning invoice ready to pay.",
      "request_body": "{ product_id: string }",
      "returns": "{ status: 'ready_to_pay', product: {...}, invoice: { id, bolt11, checkoutLink, amount, currency } }",
      "note": "POST only. If you have the bitcoin-agent MCP server, use the buy_product MCP tool instead — it calls this endpoint AND pays the bolt11 automatically in one step."
    },
    "invoice_status": {
      "url": "/api/invoices/{invoice_id}",
      "method": "GET",
      "description": "Check the payment status of an invoice.",
      "returns": "{ id, status, amount, currency }"
    },
    "merchants_list": {
      "url": "/api/merchants",
      "method": "GET",
      "description": "List all merchants on the platform.",
      "returns": "{ merchants: [...], total }"
    }
  },

  "agent_workflow": {
    "recommended": "If you have the bitcoin-agent MCP server configured, use MCP tools exclusively — they handle POST requests, Lightning payments, and EUR→sats conversion automatically.",
    "mcp_tools": {
      "step_1": "discover_shop — confirms this shop accepts Lightning and lists categories",
      "step_2": "browse_shop({ category: 'bikini' }) — returns products with priceSats already computed",
      "step_3": "buy_product({ product_id: 'kk-sugiton' }) — handles POST /checkout + pay_invoice in one atomic call",
      "note": "Do NOT use web_fetch for the checkout step — POST is required and web_fetch is GET-only. Use buy_product instead."
    },
    "web_only_fallback": {
      "note": "If MCP is not available, you can GET /api/merchants/kai-and-koa/products to browse. For checkout, you must use a tool that supports POST requests (e.g. the MCP buy_product tool or a direct HTTP client)."
    }
  },

  "instructions_for_ai_agents": {
    "preferred_flow": "Always use MCP buy_product(product_id) — never use web_fetch to POST checkout or resolve prices manually.",
    "tools": {
      "discover_shop": "Fetch this manifest. Confirms Lightning support, categories, and available MCP tools. Call this FIRST.",
      "browse_shop": "Query catalog with optional category filter. Returns product_ids and priceSats ready for buy_product.",
      "buy_product": "Full autonomous purchase by product ID. Internally: fetches price, creates EUR invoice on BTCPay, extracts bolt11, pays via NWC, returns receipt + preimage. No price lookup needed."
    },
    "anti_patterns": [
      "Do not use web_fetch to POST /checkout",
      "Do not search the web for BTC/EUR price",
      "Do not scrape the merchant HTML page",
      "Do not use buy_from_shop — it requires amount_sats manually. Use buy_product instead.",
      "Do not call create_shop_invoice manually — buy_product handles this internally."
    ]
  },

  "payment": {
    "methods": ["lightning", "onchain"],
    "currencies": ["EUR"],
    "network": "signet-mutinynet",
    "note": "All Lightning payments are on Bitcoin Signet (Mutinynet) for development/testing. Invoice prefix: lntbs."
  },

  "categories": [
    "bikini",
    "trikini",
    "one-piece",
    "sport-top",
    "legging",
    "gift-card"
  ],

  "contact": {
    "support": "https://thebitcoinfinance.com/contact",
    "shop_website": "https://kaikoaworld.com"
  }
}
