get:
  tags:
    - Licenses
  summary: Validate a license key
  description: |
    Validates a license key against a purchase and returns detailed information about the license status.
  operationId: validateLicenseKey
  parameters:
    - name: purchase_id
      in: query
      description: The purchase ID to validate the license key against
      required: true
      schema:
        type: string
    - name: license_key
      in: query
      description: The license key to validate
      required: true
      schema:
        type: string
  responses:
    '200':
      description: Successful operation
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: object
                properties:
                  is_license_valid:
                    type: string
                    enum: [Y, N]
                    description: Whether the license key is valid and the purchase can be delivered
                  is_license_key_found:
                    type: string
                    enum: [Y, N]
                    description: Whether the license key was found in the purchase
                  purchase_id:
                    type: string
                    description: The purchase ID
                  license_key:
                    type: string
                    description: The found license key
                  product_id:
                    type: integer
                    description: The product ID
                  product_name:
                    type: string
                    description: The product name
                  billing_tatus:
                    type: string
                    description: The billing status code
                  billing_tatus_msg:
                    type: string
                    description: Human-readable billing status message
                  last_payment_at:
                    type: string
                    format: date-time
                    description: Date and time of the last payment
                  last_payment_at_msg:
                    type: string
                    description: Formatted date of the last payment
                  next_payment_at:
                    type: string
                    format: date-time
                    description: Date and time of the next payment
                  next_payment_at_msg:
                    type: string
                    description: Formatted date of the next payment
                  last_transaction_type:
                    type: string
                    description: The last transaction type code
                  last_transaction_type_msg:
                    type: string
                    description: Human-readable last transaction type
                  paid_until:
                    type: string
                    format: date
                    description: Date until which the subscription is paid (for recurring payments)
                  paid_until_msg:
                    type: string
                    description: Formatted date until which the subscription is paid
  security:
    - ApiKeyAuth: []
