openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: API specification servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: topup description: Top Up operations paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check description: Returns server health status responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /topup/paket/{username}: get: operationId: getPaket tags: [topup] summary: Get available packages for a user parameters: - name: username in: path required: true schema: type: string responses: "200": description: List of available packages content: application/json: schema: $ref: "#/components/schemas/PaketResponse" /topup/qris/{id}/{username}: get: operationId: getQris tags: [topup] summary: Get QRIS payment for a package parameters: - name: id in: path required: true schema: type: string - name: username in: path required: true schema: type: string responses: "200": description: QRIS payment data content: application/json: schema: $ref: "#/components/schemas/QrisResponse" /topup/check/{username}/{otp}: get: operationId: checkPayment tags: [topup] summary: Check payment status by username and OTP parameters: - name: username in: path required: true schema: type: string - name: otp in: path required: true schema: type: string responses: "200": description: Payment check result content: application/json: schema: $ref: "#/components/schemas/TransaksiCheckResult" components: schemas: HealthStatus: type: object properties: status: type: string required: - status PaketItem: type: object properties: id: type: string name: type: string type: type: string price: type: string rewards: type: array items: type: string required: - id - name - type - price - rewards PaketResponse: type: object properties: status: type: boolean message: type: string data: type: array items: $ref: "#/components/schemas/PaketItem" required: - status PaymentInfo: type: object properties: qris: type: string otp: type: string total_bayar: type: string status: type: string required: - qris - otp - total_bayar - status PackageInfo: type: object properties: name: type: string price: type: string required: - name - price QrisResponse: type: object properties: status: type: boolean message: type: string package: $ref: "#/components/schemas/PackageInfo" payment: $ref: "#/components/schemas/PaymentInfo" required: - status CheckUser: type: object properties: id: type: integer username: type: string name: type: string required: - id - username - name CheckPaket: type: object properties: name: type: string rewards: type: array items: type: string required: - name - rewards CheckData: type: object properties: id: type: integer paket_id: type: integer paket: $ref: "#/components/schemas/CheckPaket" nominal: type: integer unique_code: type: integer total_bayar: type: integer status_pembayaran: type: string otp: type: string created_at: type: string updated_at: type: string required: - id - paket_id - paket - nominal - unique_code - total_bayar - status_pembayaran - otp - created_at - updated_at TransaksiCheckResult: type: object properties: status: type: boolean message: type: string user: $ref: "#/components/schemas/CheckUser" data: $ref: "#/components/schemas/CheckData" required: - status