openapi: 3.0.0
info:
  title: Question Set
  description: APIs for question set
  version: 1.0.0
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

paths:
  /api/payment/save-payment-information:
    post:
      summary: Pay with ESEWA
      description: |
        You can only pay with esewa now. So, payment_gateway = 'ESEWA' (ALL CAPITALS)
      tags:
        - "PAYMENT"
      requestBody:
        description: JSON object containing product_id, refId, transaction_date, payment_for, payment_gateway, payment_amount
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                payment_for:
                  type: string
                  example: "QUESTION_SET or PACKAGE_SET"
                product_id:
                  type: number
                  example: 12
                payment_gateway:
                  type: string
                  example: "ESEWA"
                payment_amount:
                  type: number
                  example: 123
                transaction_date:
                  type: string
                  format: date
                  example: '2059-07-11'
                refId:
                  type: string
                  example: "9832q9"
              required:
                - payment_for
                - product_id
                - payment_gateway
                - transaction_date
                - refId
      responses:
        "201":
          description: Successful response containing status and message
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Your transaction was successfull
                  data:
                    type: object
                    example: "{}"
              required:
                - status
                - message
        "400":
          description: Bad request error message
        "401":
          description: Unauthorized error message
        "500":
          description: Internal Server Error
