{
  "openapi": "3.1.0",
  "info": {
    "title": "iptv tunisie API",
    "version": "1.0.0",
    "description": "iptv tunisie subscriptions + agent-payable resources."
  },
  "servers": [
    {
      "url": "https://iptvtunisie.cloud"
    }
  ],
  "paths": {
    "/api/v1/subscribe": {
      "post": {
        "operationId": "createSubscription",
        "summary": "Create an IPTV subscription",
        "description": "Agent-payable: pays via x402 / MPP and returns activation credentials.",
        "x-payment-info": {
          "intent": "charge",
          "method": "x402",
          "amount": "10.00",
          "currency": "USD",
          "description": "Monthly iptv tunisie subscription",
          "wallet": {
            "scheme": "x402",
            "facilitator": "https://x402.org/facilitator"
          }
        },
        "responses": {
          "200": {
            "description": "Subscription created"
          },
          "402": {
            "description": "Payment required (x402 challenge in WWW-Authenticate)"
          }
        }
      }
    },
    "/api/v1/trial": {
      "post": {
        "operationId": "createTrial",
        "summary": "Create a free trial",
        "x-payment-info": {
          "intent": "session",
          "method": "x402",
          "amount": "0",
          "currency": "USD",
          "description": "Free 24h trial"
        },
        "responses": {
          "200": {
            "description": "Trial created"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "http",
        "scheme": "x402",
        "description": "x402 agent-payable HTTP scheme"
      },
      "oidc": {
        "type": "openIdConnect",
        "openIdConnectUrl": "https://iptvtunisie.cloud/.well-known/openid-configuration"
      }
    }
  }
}