{
  "name": "AgentPay",
  "description": "Payment infrastructure for AI agents. Prepaid credit wallets, agent-to-agent payments, spend controls, 402 top-up instructions, and credit redemption via REST API.",
  "api_base": "https://agentpay.nanocorp.app/api",
  "auth_scheme": {
    "type": "api_key",
    "in": "header",
    "header": "Authorization",
    "format": "Bearer <api_key>",
    "demo_mode": "The public demo endpoints currently accept unauthenticated requests. Live API access uses an API key in the Authorization header or X-API-Key header."
  },
  "pricing_url": "https://agentpay.nanocorp.app/#pricing",
  "checkout_url": "https://checkout.nanocorp.so/c/QfsWt42Pnik0EmvWOyvr",
  "topup_url": "https://checkout.nanocorp.so/c/QfsWt42Pnik0EmvWOyvr",
  "insufficient_balance": {
    "status": 402,
    "response_fields": [
      "error",
      "current_balance",
      "topup_url",
      "how_to_pay"
    ],
    "error": "insufficient_balance",
    "how_to_pay": "Surface topup_url to a human operator. After checkout is completed with the agent's registered email, call POST /api/redeem with the agent API key."
  },
  "capabilities": [
    {
      "operation": "register_agent",
      "method": "POST",
      "endpoint": "https://agentpay.nanocorp.app/api/register-agent",
      "request_example": {
        "agent_name": "my-agent",
        "email": "agent@example.com"
      },
      "response_fields": [
        "api_key",
        "balance",
        "credits_included",
        "topup_url"
      ]
    },
    {
      "operation": "check_balance",
      "method": "GET",
      "endpoint": "https://agentpay.nanocorp.app/api/demo/balance",
      "currency": "usd",
      "per_transaction_limit_usd": null,
      "limits": {
        "demo_rate_limit": "10 requests per IP per hour",
        "demo_wallet_balance_usd": 10
      }
    },
    {
      "operation": "make_payment",
      "method": "POST",
      "endpoint": "https://agentpay.nanocorp.app/api/pay",
      "currency": "usd",
      "per_transaction_limit_usd": 10,
      "limits": {
        "minimum_amount_usd": 0.01
      }
    },
    {
      "operation": "redeem_topup",
      "method": "POST",
      "endpoint": "https://agentpay.nanocorp.app/api/redeem",
      "description": "Apply an unredeemed $10 Agent Credits Pack purchase to the authenticated agent key after checkout completes with the same registered email.",
      "optional_request_fields": [
        "checkout_session_id"
      ]
    }
  ],
  "contact": "agentpay@nanocorp.app",
  "mcp": {
    "endpoint": "https://agentpay.nanocorp.app/mcp",
    "transport": "streamable-http",
    "protocol_version": "2025-06-18",
    "install_snippet": {
      "mcpServers": {
        "agentpay": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://agentpay.nanocorp.app/mcp"
          ]
        }
      }
    },
    "tools": [
      {
        "name": "register_agent",
        "maps_to": "POST https://agentpay.nanocorp.app/api/register-agent",
        "response_fields": [
          "api_key",
          "balance",
          "credits_included",
          "topup_url"
        ]
      },
      {
        "name": "check_balance",
        "maps_to": "GET https://agentpay.nanocorp.app/api/demo/balance",
        "auth": "Optional api_key argument for live wallet balance; omit for demo mode."
      },
      {
        "name": "pay",
        "maps_to": "POST https://agentpay.nanocorp.app/api/pay",
        "insufficient_balance": "Returns the raw HTTP 402 body including topup_url and how_to_pay."
      },
      {
        "name": "redeem",
        "maps_to": "POST https://agentpay.nanocorp.app/api/redeem"
      }
    ]
  }
}
