components:
  schemas:

    PaymentResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Internal transaction ID
          example: "018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        external_id:
          type: string
          description: Transaction ID in external API (Asaas)
          example: "pay_018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        date:
          type: string
          format: date-time
          description: Transaction date
          example: "2024-01-01T10:00:00Z"
        
        value:
          type: number
          format: float
          description: Transaction amount
          example: 150.50
        
        method:
          type: string
          description: Payment method used
          enum: [CARD, BOLETO, PIX, BANK_TRANSFER, UNDEFINED]
          example: "PIX"
        
        status:
          type: string
          description: Current transaction status
          enum: [PENDING, PAID, CANCELED]
          example: "PAID"
        
        class_id:
          type: string
          format: uuid
          description: Associated class ID
          example: "018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        user_id:
          type: string
          format: uuid
          description: User ID involved in the transaction
          example: "018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        payer:
          type: string
          description: Who made the payment
          enum: [STUDENT, PLATFORM]
          example: "STUDENT"
        
        payee:
          type: string
          description: Who received the payment
          enum: [PLATFORM, TEACHER]
          example: "TEACHER"

        created_at:
          type: string
          format: date-time
          example: "2024-01-01T10:00:00Z"

        updated_at:
          type: string
          format: date-time
          example: "2024-01-01T10:00:00Z"


    PaymentWithBillingInfoResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Internal transaction ID
          example: "018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        external_id:
          type: string
          description: Transaction ID in external API (Asaas)
          example: "pay_018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        date:
          type: string
          format: date-time
          description: Transaction date
          example: "2024-01-01T10:00:00Z"
        
        value:
          type: number
          format: float
          description: Transaction amount
          example: 150.50
        
        method:
          type: string
          description: Payment method used
          enum: [CARD, BOLETO, PIX, BANK_TRANSFER, UNDEFINED]
          example: "PIX"
        
        status:
          type: string
          description: Current transaction status
          enum: [PENDING, PAID, CANCELED]
          example: "PAID"
        
        class_id:
          type: string
          format: uuid
          description: Associated class ID
          example: "018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        user_id:
          type: string
          format: uuid
          description: User ID involved in the transaction
          example: "018f22d5-4b3a-7c21-b93f-9a5aefc1b847"
        
        payer:
          type: string
          description: Who made the payment
          enum: [STUDENT, PLATFORM]
          example: "STUDENT"
        
        payee:
          type: string
          description: Who received the payment
          enum: [PLATFORM, TEACHER]
          example: "TEACHER"
        
        billingInfo:
          type: object
          description:
          nullable: true
          properties:
            pix:
              type: object
              description: PIX payment details
              nullable: true
              properties:
                encodedImage:
                  type: string
                  description: Base64 encoded PIX QR code image
                  example: "iVBORw0KGgoAAAANSUhEUgAAAcI......."
                payload:
                  type: string
                  description: PIX payload for payment
                  example: "00020101021226820014br.gov.bcb.pix234...."
                expirationDate:
                  type: string
                  description: Expiration date and time for the PIX payment
                  example: "2027-12-15 23:59:59"

            creditCard:
              type: object
              description: Credit card payment details
              nullable: true
              properties:
                creditCardNumber:
                  type: string
                  nullable: true
                  description: Masked credit card number
                  example: "**** **** **** 1234"
                creditCardBrand:
                  type: string
                  nullable: true
                  description: Credit card brand
                  example: "VISA"

            bankSlip:
              type: object
              description: Bank slip (boleto) payment details
              nullable: true
              properties:
                identificationField:
                  type: string
                  description: Bank slip identification field (linha digitável)
                  example: "46191110000000000000011845033015516610000004000"
                nossoNumero:
                  type: string
                  description: Bank slip number (nosso número)
                  example: "11845033"
                barCode:
                  type: string
                  description: Bank slip barcode
                  example: "46195166100000040001110000000000001184503301"
                daysAfterDueDateToRegistrationCancellation:
                  type: integer
                  nullable: true
                  description: Days after due date until registration cancellation
                  example: 7
                bankSlipUrl:
                  type: string
                  description: URL to download the bank slip
                  example: "https://sandbox.asaas.com/b/pdf/7r2fmqexz6ftkgrs"

        transactionReceiptUrl:
          type: stirng
          format: link
          nullable: true
          description: Link to access the receipt
          example: https://api.example.com/comprovantes/123456

        created_at:
          type: string
          format: date-time
          example: "2024-01-01T10:00:00Z"

        updated_at:
          type: string
          format: date-time
          example: "2024-01-01T10:00:00Z"
