> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Create dynamic QR code

> Generate a single-use, dynamic, Pix QR code with advanced features like expiration, payer validation, and additional payment information. Ideal for invoicing and controlled payments.



## OpenAPI

````yaml en/openapi/v3-current/pix.yaml POST /v1/qrcodes/dynamic
openapi: 3.0.3
info:
  title: Plugin BR Pix Direct - Complete API
  description: |
    Complete API for Brazilian Pix instant payment system including
    Pix key dictionary operations, QR code generation/decoding, transactions and
    transaction limits.
  version: 1.0.0
servers:
  - url: https://plugin-pix-direct.api.lerian.net
  - url: https://plugin-pix-direct-qrcode.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/qrcodes/dynamic:
    post:
      tags:
        - QR Codes API
      summary: Create dynamic QR code
      description: >-
        Generate a single-use, dynamic, Pix QR code with advanced features like
        expiration, payer validation, and additional payment information. Ideal
        for invoicing and controlled payments.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDynamicQRCodeRequest'
      responses:
        '200':
          description: Dynamic QR code created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QRCodeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateDynamicQRCodeRequest:
      type: object
      required:
        - type
        - key
        - amount
        - recipientName
        - payer
        - dueDate
        - expirationTime
        - city
        - zipCode
        - recipientConciliationId
        - partnerId
        - description
      properties:
        type:
          type: string
          description: >-
            Specifies the QR Code type. For `IMMEDIATE`, this indicates a
            single-use QR Code generated for instant Pix payments with a
            predefined amount and expiration time.
          enum:
            - IMMEDIATE
          example: IMMEDIATE
        key:
          type: string
          description: Pix key of the recipient.
          example: '12345678901'
        amount:
          type: number
          description: Amount for the dynamic QR code.
          format: double
          example: 50
        recipientName:
          type: string
          description: Name of the recipient (payee).
          example: João da Silva
        payer:
          type: object
          description: Payer information.
          required:
            - document
            - validate
            - name
          properties:
            document:
              type: string
              description: CPF (11 digits) or CNPJ (14 digits) of the payer.
              example: '98765432100'
            validate:
              type: boolean
              description: Indicates if the payer's key should be validated.
              example: true
            name:
              type: string
              description: Name of the payer.
              example: Maria Santos
        dueDate:
          type: string
          description: Due date for the payment (YYYY-MM-DD).
          format: date
          example: '2024-12-31'
        expirationTime:
          type: integer
          description: Expiration time in seconds after which the QR code becomes invalid.
          example: 3600
        city:
          type: string
          description: City of the recipient.
          example: São Paulo
        zipCode:
          type: string
          description: ZIP code of the recipient (8 digits).
          example: '01234567'
        recipientConciliationId:
          type: string
          description: Identifier for conciliation by the recipient.
          example: CONC123456789
        partnerId:
          type: string
          description: Identifier for the partner system.
          format: uuid
          example: 019c96a0-0c0c-7221-8cf3-13313fb60081
        description:
          type: array
          description: List of descriptions for the payment.
          items:
            type: object
            required:
              - name
              - value
            properties:
              name:
                type: string
                description: Description name.
                example: Invoice
              value:
                type: string
                description: Description value.
                example: INV-001
    QRCodeResponse:
      type: object
      required:
        - qrCode
      properties:
        qrCode:
          type: string
          description: Generated Pix QR code string.
          example: >-
            00020101021226850014br.gov.bcb.pix2563qrcode.example.com.br/v2/cobv/9d36b84fc70b478fb95c12729b90ca255204000053039865802BR5913Merchant
            Name6009Sao Paulo62070503***63042C43
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
        details:
          type: array
          items:
            type: string
          description: Additional error details
  responses:
    BadRequest:
      description: Bad Request - Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_key_type:
              summary: Invalid key type
              value:
                code: INVALID_KEY_TYPE
                message: Key type must be between 0 and 4
                details:
                  - 'keyType: must be one of [0, 1, 2, 3, 4]'
            missing_required_field:
              summary: Missing required field
              value:
                code: VALIDATION_ERROR
                message: Required field is missing
                details:
                  - 'accountId: field is required'
            invalid_document_format:
              summary: Invalid document format
              value:
                code: INVALID_DOCUMENT
                message: Document must be valid CPF (11 digits) or CNPJ (14 digits)
                details:
                  - 'document: must match pattern ^\d{11}$|^\d{14}$'
            invalid_phone_format:
              summary: Invalid phone format
              value:
                code: INVALID_PHONE
                message: Phone must be in Brazilian format
                details:
                  - 'phone: must match pattern ^\+55\d{2}\d{8,9}$'
    Unauthorized:
      description: Unauthorized - Invalid or missing authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_token:
              summary: Missing authentication token
              value:
                code: MISSING_TOKEN
                message: Authorization header is required
                details: []
            invalid_token:
              summary: Invalid token
              value:
                code: INVALID_TOKEN
                message: Invalid or expired access token
                details: []
            expired_token:
              summary: Expired token
              value:
                code: TOKEN_EXPIRED
                message: Access token has expired. Please obtain a new token.
                details: []
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            generic_error:
              summary: Generic internal error
              value:
                code: INTERNAL_ERROR
                message: An internal error occurred. Please try again later.
                details: []
            database_error:
              summary: Database error
              value:
                code: DATABASE_ERROR
                message: Database operation failed
                details: []
            external_service_error:
              summary: External service error
              value:
                code: EXTERNAL_SERVICE_ERROR
                message: External service (JD Pix) is temporarily unavailable
                details: []
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT Bearer token authentication. Obtain token from
        `/v1/login/oauth/access_token` endpoint

        using client credentials (clientId and clientSecret).


        Include token in Authorization header:

        `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`


        Token expires after 3600 seconds (1 hour).

````