{
  "openapi": "3.1.0",
  "info": {
    "title": "Whish Bills",
    "version": "1.2",
    "description": "Fetch and pay real-time bills with an OTP-verified fetch flow."
  },
  "servers": [
    {
      "url": "https://api.whish.money/itel-service/api",
      "description": "Production"
    },
    {
      "url": "https://api.sandbox.whish.money/itel-service/api",
      "description": "Sandbox"
    }
  ],
  "components": {
    "securitySchemes": {
      "sessionIdAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "sessionId"
      },
      "tokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "token"
      },
      "languageAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "language"
      },
      "UserAgentAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "User-Agent"
      }
    }
  },
  "security": [
    {
      "sessionIdAuth": [],
      "tokenAuth": [],
      "languageAuth": [],
      "UserAgentAuth": []
    }
  ],
  "paths": {
    "/account/balance": {
      "get": {
        "summary": "Account balance",
        "responses": {
          "200": {
            "description": "Standard response envelope.",
            "content": {
              "application/json": {
                "example": {
                  "status": true,
                  "code": null,
                  "dialog": null,
                  "data": {
                    "balanceDetails": {
                      "balance": -217.718,
                      "voidBalance": 0.0
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bill/fetch": {
      "post": {
        "summary": "Fetch bill (submit verificationId + otp on step 2)",
        "responses": {
          "200": {
            "description": "Standard response envelope.",
            "content": {
              "application/json": {
                "example": {
                  "status": true,
                  "code": null,
                  "dialog": null,
                  "data": {
                    "billId": 1220,
                    "target": "0555555555",
                    "baseAmount": 19.0,
                    "totalAmount": 19.0
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "denominationId": 53001,
                "target": "971555555555"
              }
            }
          }
        }
      }
    },
    "/bill/payment": {
      "post": {
        "summary": "Pay bill",
        "responses": {
          "200": {
            "description": "Standard response envelope.",
            "content": {
              "application/json": {
                "example": {
                  "status": true,
                  "code": null,
                  "dialog": null,
                  "data": null
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "example": {
                "externalId": 9876543210,
                "billId": 1220,
                "amount": 19.0
              }
            }
          }
        }
      }
    }
  }
}