{
    "openapi": "3.0.0",
    "info": {
        "title": "Fee Module API",
        "description": "REST API for the Linways Fee Module: student fee payment, dashboards and KPI reporting.",
        "version": "1.0"
    },
    "servers": [
        {
            "url": "/fm/api/v1",
            "description": "Fee Module API v1"
        }
    ],
    "paths": {
        "/dashboard/fee-heads": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Search fee heads",
                "operationId": "18a1a38ae9dfa83078f49dac822e1eff",
                "parameters": [
                    {
                        "name": "id",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "name",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "isActive",
                        "in": "query",
                        "schema": {
                            "type": "boolean",
                            "default": true
                        }
                    },
                    {
                        "name": "accountId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "List of fee heads",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/dashboard/total-assigned": {
            "post": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Total assigned fee amount (formatted currency)",
                "operationId": "bd5a23defee10e641170eaeeb5cfd497",
                "responses": {
                    "200": {
                        "description": "Total assigned amount",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/dashboard/total-collected": {
            "post": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Total collected fee amount (formatted currency)",
                "operationId": "3dee864fa3a87138867c82d16a353703",
                "responses": {
                    "200": {
                        "description": "Total collected amount",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/dashboard/total-pending": {
            "post": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Total pending fee amount (assigned minus collected)",
                "operationId": "0d29424e70f0ef2a654fae987341e87a",
                "responses": {
                    "200": {
                        "description": "Total pending amount",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/dashboard/year-wise-concession-assigned": {
            "post": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Concession assigned, grouped by year",
                "operationId": "9ec64d15d5584bbed733986d9a772d0b",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "identifyingContext": {
                                        "properties": {
                                            "filters": {
                                                "type": "array",
                                                "items": {
                                                    "type": "object"
                                                }
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Year-wise concession datasets",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/dashboard/payment-status-summary": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Payment status summary counts",
                "operationId": "93be266574387de241cb8a3f9746552a",
                "parameters": [
                    {
                        "name": "feeHeadId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "batchId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "semId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "academicYear",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "studentIds",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Payment status summary",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/dashboard/payment-status-students": {
            "get": {
                "tags": [
                    "Dashboard"
                ],
                "summary": "Student list filtered by payment category",
                "operationId": "d07f2ddd5c590f021bfca2c3b119216f",
                "parameters": [
                    {
                        "name": "feeHeadId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Payment category filter",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "batchId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "semId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "academicYear",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "studentIds",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "integer"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Students by payment category",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/kpi-fee-dashboard/summary": {
            "get": {
                "tags": [
                    "KpiDashboard"
                ],
                "summary": "Fee dashboard summary aggregates",
                "operationId": "725db04d35619b0a0c6636950a951ddd",
                "parameters": [
                    {
                        "name": "fromDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "toDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "departmentIds",
                        "in": "query",
                        "description": "Comma-separated department IDs",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "programIds",
                        "in": "query",
                        "description": "Comma-separated program IDs",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Dashboard summary",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/kpi-fee-dashboard/drill-down": {
            "get": {
                "tags": [
                    "KpiDashboard"
                ],
                "summary": "Drill-down fee data by school / department / program / batch / term",
                "operationId": "19663b43e84368305c681ea424dafc57",
                "parameters": [
                    {
                        "name": "level",
                        "in": "query",
                        "description": "Drill-down level",
                        "schema": {
                            "type": "string",
                            "default": "schools"
                        }
                    },
                    {
                        "name": "fromDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "toDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "schoolId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "departmentId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "programId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "batchId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "termId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "departmentIds",
                        "in": "query",
                        "description": "Comma-separated department IDs",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "programIds",
                        "in": "query",
                        "description": "Comma-separated program IDs",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Drill-down data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/kpi-fee-dashboard/student-fee-details": {
            "get": {
                "tags": [
                    "KpiDashboard"
                ],
                "summary": "Fee details for a single student",
                "operationId": "e7f3e5c419e37fdeefad532af3d57c65",
                "parameters": [
                    {
                        "name": "studentId",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "fromDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "toDate",
                        "in": "query",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "batchId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "semId",
                        "in": "query",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Student fee details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Fee summary for the logged-in student",
                "operationId": "b8244756476b9ca15988737fe83d604c",
                "responses": {
                    "200": {
                        "description": "Fee summary",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/{semesterId}/accounts": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Accounts payable in a semester",
                "operationId": "bc0eb94323dbde1454ee5c7fab04604c",
                "parameters": [
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Accounts payable in the semester",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/{semesterId}/installments": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Installments in a semester",
                "operationId": "68782abebbc48e383036685a3692ec4a",
                "parameters": [
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Installments in the semester",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/{semesterId}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Fee payable in a semester",
                "operationId": "bd18c9b046938a3cf7f0ddd4b0bacd82",
                "parameters": [
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Fee payable in the semester",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/{semesterId}/online-payment": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Create an online payment request",
                "operationId": "51cdaee223289ccb637b555d86a72328",
                "parameters": [
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Online payment request created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/assign-fee-and-create-payment": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Assign fee and create online payment request",
                "operationId": "2fc92aaa10b7b2abe262ee0c157a8aa7",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Fee assigned and payment request created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/{semesterId}/challan": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Generate a fee challan (student side)",
                "operationId": "e0eb082693b6a87cd3692295c4d1b917",
                "parameters": [
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Fee challan generated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/receipts/{receiptId}/{studentId}/{semesterId}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Single receipt details",
                "operationId": "7c619b2f8ad14553d4128fafa8f42d20",
                "parameters": [
                    {
                        "name": "receiptId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "studentId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Single receipt details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/student-semester-fee/{studentId}/{semesterId}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Print student semester fee details",
                "operationId": "58931d83f370ba1edc7b1a447b8c058d",
                "parameters": [
                    {
                        "name": "studentId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Student semester fee details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/challans": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "List generated challans across semesters",
                "operationId": "da97b12a0ef68d88ed0fbbf72fa5edde",
                "responses": {
                    "200": {
                        "description": "Generated challans",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/receipts": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "List fee receipts",
                "operationId": "aeaeeed8354e4ccfa9f9de616bcd4ff9",
                "responses": {
                    "200": {
                        "description": "Fee receipts",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/online-payment": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "List the student's online payment requests",
                "operationId": "94c9b106bb2a03cf6b4279de4ad0e9dc",
                "responses": {
                    "200": {
                        "description": "Online payment requests",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/online-payment/verify": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Verify an online payment status",
                "operationId": "167c69668d2ecfcb73fa19d0f6203ee2",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Online payment status",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/challans/{challanId}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Display a challan",
                "operationId": "c6e2b12bd7e31fae88eda5bef60ae583",
                "parameters": [
                    {
                        "name": "challanId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Challan details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/change-batch": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Change batch of students",
                "operationId": "8e7c0c83515b3afeb95ab788b07ea602",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Batch changed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/reports/percentage": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Percentage of fee paid",
                "operationId": "ee2288b1412ed5889c497ffd941bcae4",
                "responses": {
                    "200": {
                        "description": "Percentage of fee paid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/custom-fee-group/{id}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Custom fee group details",
                "operationId": "3e82122b2f6734a22059dbf0ca7a9e31",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Custom fee group details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Assign a custom fee group",
                "operationId": "f5c87ad705a2db76a9170ce554aceb69",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Custom fee group assigned",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/{studentId}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Pending fee semester-wise for a student",
                "operationId": "998df7d649c0fe9c11685fc42e6406d5",
                "parameters": [
                    {
                        "name": "studentId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Pending fee semester-wise",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/misc-receipts/{receiptId}/{studentId}/{semesterId}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Miscellaneous receipt details",
                "operationId": "2ee57f9d95955fb9c8494b791e8eb9ae",
                "parameters": [
                    {
                        "name": "receiptId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "studentId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Miscellaneous receipt details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/pay-fee/{semesterId}/neft-payment-request": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Save a NEFT payment request",
                "operationId": "59805f123fca080915a9e3ed175730ac",
                "parameters": [
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/NeftPayment"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "NEFT payment request saved",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/export-neft-request/{id}": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Export/print a NEFT request",
                "operationId": "fe7bac0ce7b92965be3d52b465146a60",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "NEFT request export",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/reassign-fee": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Reassign fee (student side)",
                "operationId": "22b1238b2871889d5ce9d9b390f7dbdd",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Fee reassigned",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/get-all-semester/fee": {
            "get": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Fee details across all semesters",
                "operationId": "f90e1302d1cd3c31068d179b91710fc9",
                "responses": {
                    "200": {
                        "description": "Fee details across all semesters",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/migrate-fee-to-semester/{migrateTo}/{studentId}": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Move fee to another semester",
                "operationId": "7b11c48902ea3e85362b029a2cf75ed1",
                "parameters": [
                    {
                        "name": "migrateTo",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "studentId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Fee moved to another semester",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/webhook-payment-response": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Payment gateway webhook callback",
                "description": "Public gateway callback; not JWT-authenticated (payload is encrypted/verified in the body).",
                "operationId": "439dfa08d7ff50a71bc20af12cec45f5",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Webhook processed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/my-fee/webhook-emi-request-response": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "EMI request webhook callback",
                "description": "Public gateway callback; not JWT-authenticated (payload is encrypted/verified in the body).",
                "operationId": "39c15d2c934fccb1af2136a0ad3bafab",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "EMI webhook processed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/my-fee/pay-fee/{semesterId}/emi-payment-request": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Save an EMI payment request",
                "operationId": "0f064de3d625d563839538c736f320ce",
                "parameters": [
                    {
                        "name": "semesterId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "EMI payment request saved",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/my-fee/execute-query": {
            "post": {
                "tags": [
                    "MyFee"
                ],
                "summary": "Execute a raw query (internal utility)",
                "description": "Authenticated via the x-api-key header (bypasses JWT), not a bearer token.",
                "operationId": "0e2088b540545e1b7da0639e41b1a02f",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Query executed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ApiResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "apiKeyAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "schemas": {
            "ApiResponse": {
                "description": "Standard response envelope returned by all Fee Module endpoints",
                "properties": {
                    "statusCode": {
                        "type": "integer",
                        "example": 200
                    },
                    "status": {
                        "type": "string",
                        "example": "success"
                    },
                    "message": {
                        "type": "string",
                        "example": ""
                    },
                    "result": {
                        "description": "Endpoint-specific payload"
                    }
                },
                "type": "object"
            },
            "FeeHead": {
                "description": "A fee head (a chargeable fee component) with its remittance state",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 12
                    },
                    "name": {
                        "type": "string",
                        "example": "Tuition Fee"
                    },
                    "description": {
                        "nullable": true,
                        "type": "string"
                    },
                    "accountId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "isActive": {
                        "type": "boolean",
                        "example": true
                    },
                    "priority": {
                        "type": "integer",
                        "example": 1
                    },
                    "amount": {
                        "type": "number",
                        "format": "double",
                        "example": 25000
                    },
                    "remittedAmount": {
                        "type": "number",
                        "format": "double",
                        "example": 10000
                    },
                    "balance": {
                        "type": "number",
                        "format": "double",
                        "example": 15000
                    },
                    "groupId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "groupName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "hasSubHeads": {
                        "type": "integer",
                        "example": 0
                    },
                    "frequency": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "refundableFeeHead": {
                        "type": "boolean",
                        "example": false
                    },
                    "instNotApplicableFee": {
                        "type": "boolean",
                        "example": false
                    },
                    "uniqueHeadId": {
                        "nullable": true,
                        "type": "integer"
                    }
                },
                "type": "object"
            },
            "IdentifyingContext": {
                "description": "Scope filter that narrows fee data to a course type, batch, department or batch start year",
                "properties": {
                    "courseTypeId": {
                        "type": "string",
                        "example": "ALL"
                    },
                    "batchStartYear": {
                        "type": "string",
                        "example": "ALL"
                    },
                    "departmentId": {
                        "type": "string",
                        "example": "ALL"
                    },
                    "batchId": {
                        "type": "string",
                        "example": "ALL"
                    }
                },
                "type": "object"
            },
            "NeftPayment": {
                "description": "An offline (NEFT / DD / cheque / cash) fee payment request record",
                "properties": {
                    "id": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "status": {
                        "type": "string",
                        "example": "PENDING"
                    },
                    "studentId": {
                        "type": "integer",
                        "example": 4521
                    },
                    "semesterId": {
                        "type": "integer",
                        "example": 8
                    },
                    "amount": {
                        "type": "number",
                        "format": "double",
                        "example": 15000
                    },
                    "transactionId": {
                        "nullable": true,
                        "type": "string"
                    },
                    "remittedDate": {
                        "nullable": true,
                        "type": "string",
                        "example": "2024-05-12"
                    },
                    "paymentDetails": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "admissionNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "studentName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "semesterName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "batchName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "batchId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "bankName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "paymentMethod": {
                        "nullable": true,
                        "type": "string",
                        "example": "NEFT"
                    },
                    "chequeNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "ddNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "remarks": {
                        "nullable": true,
                        "type": "string"
                    },
                    "selectedInstallment": {
                        "nullable": true,
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "ReceiptList": {
                "description": "A summary row for a fee receipt in list views",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 9812
                    },
                    "studentId": {
                        "type": "integer",
                        "example": 4521
                    },
                    "rollNumber": {
                        "nullable": true,
                        "type": "string"
                    },
                    "studentName": {
                        "type": "string",
                        "example": "Jane Doe"
                    },
                    "admissionNumber": {
                        "nullable": true,
                        "type": "string"
                    },
                    "receiptNumber": {
                        "type": "string",
                        "example": "RCPT-2024-0091"
                    },
                    "receiptDate": {
                        "type": "string",
                        "example": "2024-05-12"
                    },
                    "paymentMethod": {
                        "type": "string",
                        "example": "ONLINE"
                    },
                    "semesterId": {
                        "type": "integer",
                        "example": 8
                    },
                    "semesterName": {
                        "nullable": true,
                        "type": "string"
                    },
                    "amount": {
                        "type": "number",
                        "format": "double",
                        "example": 15000
                    },
                    "batchId": {
                        "nullable": true,
                        "type": "integer"
                    },
                    "batchName": {
                        "nullable": true,
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "StudentFeeList": {
                "description": "A student together with the batches whose fee applies to them",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 4521
                    },
                    "name": {
                        "type": "string",
                        "example": "Jane Doe"
                    },
                    "admissionNumber": {
                        "nullable": true,
                        "type": "string"
                    },
                    "studentFeeBatches": {
                        "type": "array",
                        "items": {
                            "type": "object"
                        }
                    },
                    "regNo": {
                        "nullable": true,
                        "type": "string"
                    },
                    "rollNo": {
                        "nullable": true,
                        "type": "string"
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            },
            "apiKeyAuth": {
                "type": "apiKey",
                "description": "Static API key for internal/webhook utility endpoints (bypasses JWT)",
                "name": "x-api-key",
                "in": "header"
            }
        }
    },
    "tags": [
        {
            "name": "MyFee",
            "description": "Student-facing fee payment, receipts and challans"
        },
        {
            "name": "Dashboard",
            "description": "Fee collection dashboard aggregates"
        },
        {
            "name": "KpiDashboard",
            "description": "KPI fee dashboard summaries and drill-downs"
        }
    ]
}