> ## 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 a Static QR Code

> Use this endpoint to create a static Pix BR Code that can be reused for
multiple payments.


**Notes:**

- Static QR Codes are reusable and can be paid multiple times.

- Amount is optional - if not provided, the payer will enter the amount.

- The receiver key must be owned by the account holder making the
request.

- The QR Code payload (EMV) is generated following the EMV QCO
specification.



## OpenAPI

````yaml /en/openapi/v3-current/indirect-pix.yaml post /v1/brcode/static
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - 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-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/brcode/static:
    post:
      tags:
        - QR Codes API
      summary: Create a Static QR Code
      description: |-
        Use this endpoint to create a static Pix BR Code that can be reused for
        multiple payments.


        **Notes:**

        - Static QR Codes are reusable and can be paid multiple times.

        - Amount is optional - if not provided, the payer will enter the amount.

        - The receiver key must be owned by the account holder making the
        request.

        - The QR Code payload (EMV) is generated following the EMV QCO
        specification.
      parameters:
        - $ref: '#/components/parameters/IncludeBase64'
        - $ref: '#/components/parameters/XAccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStaticBRCodeInput'
            example:
              receiverKey: '+5511999999999'
              amount: '100.00'
              description: Payment for order
      responses:
        '201':
          description: Static QR Code created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaticBRCodeOutput'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0001:
                  $ref: '#/components/examples/ErrorPIX0001'
                ErrorPIX0003:
                  $ref: '#/components/examples/ErrorPIX0003'
                ErrorPIX0004:
                  $ref: '#/components/examples/ErrorPIX0004'
                ErrorPIX0304:
                  $ref: '#/components/examples/ErrorPIX0304'
                ErrorPIX0305:
                  $ref: '#/components/examples/ErrorPIX0305'
                ErrorPIX0306:
                  $ref: '#/components/examples/ErrorPIX0306'
                ErrorPIX0307:
                  $ref: '#/components/examples/ErrorPIX0307'
                ErrorPIX0309:
                  $ref: '#/components/examples/ErrorPIX0309'
                ErrorPIX0310:
                  $ref: '#/components/examples/ErrorPIX0310'
                ErrorPIX0312:
                  $ref: '#/components/examples/ErrorPIX0312'
                ErrorPIX0319:
                  $ref: '#/components/examples/ErrorPIX0319'
                ErrorPIX0324:
                  $ref: '#/components/examples/ErrorPIX0324'
                ErrorPIX0327:
                  $ref: '#/components/examples/ErrorPIX0327'
                ErrorPIX0328:
                  $ref: '#/components/examples/ErrorPIX0328'
                ErrorPIX0329:
                  $ref: '#/components/examples/ErrorPIX0329'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
      deprecated: false
      security:
        - bearerAuth: []
components:
  parameters:
    IncludeBase64:
      name: include_base64
      in: query
      description: Returns the rendered QR code in base64 alongside the EMV payload.
      required: false
      schema:
        type: boolean
        default: false
    XAccountId:
      name: X-Account-Id
      in: header
      description: Unique identifier of the Midaz Ledger Account (UUID format).
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
  schemas:
    CreateStaticBRCodeInput:
      type: object
      required:
        - receiverKey
      properties:
        receiverKey:
          type: string
          description: Pix key that will receive the payment.
          example: '+5511999999999'
        amount:
          type: string
          description: Optional fixed amount.
          example: '100.00'
        description:
          type: string
          description: Custom description.
          example: 'Payment for order #12345'
        txId:
          type: string
          description: Optional transaction identifier.
          example: TXabcdefghijklmno123456789
    StaticBRCodeOutput:
      type: object
      properties:
        id:
          type: string
          description: QR Code unique identifier.
          example: 019c96a0-0bf7-7060-8f39-1bfbcb9168ca
        emv:
          type: string
          description: EMV QR Code payload.
          example: 00020126580014br.gov.bcb.pix...
        base64:
          type: string
          description: Base64 encoded QR Code image (if requested).
        receiverKey:
          type: string
          description: Pix key.
          example: '+5511999999999'
        amount:
          type: string
          description: Fixed amount (if set).
          example: '100.00'
        description:
          type: string
          description: Description.
          example: 'Payment for order #12345'
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  examples:
    ErrorPIX0001:
      summary: Missing Headers in Request
      value:
        code: PIX-0001
        title: Missing Headers in Request
        message: >-
          Your request is missing one or more required header params. Please
          refer to the documentation to ensure all necessary header params are
          included in your request.
    ErrorPIX0003:
      summary: Missing Fields in Request
      value:
        code: PIX-0003
        title: Missing Fields in Request
        message: >-
          Your request is missing one or more required fields. Please refer to
          the documentation to ensure all necessary fields are included in your
          request.
    ErrorPIX0004:
      summary: Invalid Field Values in Request
      value:
        code: PIX-0004
        title: Invalid Field Values in Request
        message: >-
          Your request contains one or more fields with invalid values. Please
          refer to the documentation to verify that all fields have the correct
          values.
    ErrorPIX0304:
      summary: Invalid Amount
      value:
        code: PIX-0304
        title: Invalid Amount
        message: >-
          The amount must be greater than zero and follow the 0.00 format with
          two decimals.
    ErrorPIX0305:
      summary: Invalid City
      value:
        code: PIX-0305
        title: Invalid City
        message: The city must contain only letters and spaces.
    ErrorPIX0306:
      summary: Invalid TxID Format
      value:
        code: PIX-0306
        title: Invalid TxID Format
        message: The txId format is invalid.
    ErrorPIX0307:
      summary: Receiver Key Required
      value:
        code: PIX-0307
        title: Receiver Key Required
        message: The receiverKey is required.
    ErrorPIX0309:
      summary: Invalid Category Code Format
      value:
        code: PIX-0309
        title: Invalid Category Code Format
        message: The categoryCode must be numeric.
    ErrorPIX0310:
      summary: Invalid Merchant Name
      value:
        code: PIX-0310
        title: Invalid Merchant Name
        message: The merchant name is required.
    ErrorPIX0312:
      summary: Invalid Receiver Key
      value:
        code: PIX-0312
        title: Invalid Receiver Key
        message: The receiverKey is invalid.
    ErrorPIX0319:
      summary: Receiver Key Not Associated
      value:
        code: PIX-0319
        title: Receiver Key Not Associated
        message: The receiver key is not associated with the account.
    ErrorPIX0324:
      summary: Invalid Amount Value
      value:
        code: PIX-0324
        title: Invalid Amount Value
        message: The amount is not a valid decimal.
    ErrorPIX0327:
      summary: Invalid Client Request ID
      value:
        code: PIX-0327
        title: Invalid Client Request ID
        message: The client request ID must be a valid UUID.
    ErrorPIX0328:
      summary: Invalid Image Type
      value:
        code: PIX-0328
        title: Invalid Image Type
        message: 'The image type must be one of: Gif, Jpeg, Png.'
    ErrorPIX0329:
      summary: Invalid Pixels Per Module
      value:
        code: PIX-0329
        title: Invalid Pixels Per Module
        message: The pixels per module value is out of bounds.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````