{
  "openapi": "3.1.0",
  "info": {
    "title": "Boffin Studio Commerce API",
    "version": "1.0.0",
    "description": "Agentic Commerce and autonomous payment API for Boffin Studio."
  },
  "x-service-info": {
    "categories": ["ecommerce", "developer-tools", "media"],
    "docs": {
      "homepage": "https://boffinstudio.com",
      "llms": "https://boffinstudio.com/llms.txt",
      "apiReference": "https://boffinstudio.com/openapi.json"
    }
  },
  "servers": [
    {
      "url": "https://boffinstudio.com",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/wp-json/boffin-acp/v1/pay": {
      "post": {
        "summary": "Execute Machine Payment",
        "operationId": "executeMachinePayment",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "method": {
                    "type": "string",
                    "enum": ["stripe", "tempo", "card", "lightning"],
                    "description": "Selected payment method from offers."
                  },
                  "payment_token": {
                    "type": "string",
                    "description": "The Shared Payment Token (SPT), Lightning invoice pre-image, or on-chain transaction hash."
                  }
                },
                "required": ["method", "payment_token"]
              }
            }
          }
        },
        "x-payment-info": {
          "offers": [
            {
              "intent": "charge",
              "method": "stripe",
              "amount": 100,
              "currency": "usd",
              "description": "Stripe Shared Payment Token or Card"
            },
            {
              "intent": "charge",
              "method": "tempo",
              "amount": 500,
              "currency": "usdc",
              "description": "Tempo USDC on-chain payment (Settled on Base network)"
            },
            {
              "intent": "charge",
              "method": "card",
              "amount": 100,
              "currency": "usd",
              "description": "Credit or Debit Card"
            },
            {
              "intent": "charge",
              "method": "lightning",
              "amount": 1000,
              "currency": "sat",
              "description": "Bitcoin Lightning Network payment in Satoshis"
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Payment Successful",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "transaction_id": { "type": "string" }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required - The requested resource requires direct machine settlement"
          }
        }
      }
    }
  }
}