> ## 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.

# Decode a Pix QR code via its payload URL

> Decodes a dynamic Pix QR code by the payee-published JWS payload URL, normalizing static / immediate-dynamic / cobv sub-types into one null-safe response. Unlike the scan decode it takes a urlPayloadJson the upstream fetches; the payer document is sourced from the CRM alias for the upstream decode header.



## OpenAPI

````yaml en/openapi/v3-current/pix.yaml POST /v1/qrcodes/decode/url
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/decode/url:
    post:
      tags:
        - QR Codes API
      summary: Decode a Pix QR code via its payload URL
      description: >-
        Decodes a dynamic Pix QR code by the payee-published JWS payload URL,
        normalizing static / immediate-dynamic / cobv sub-types into one
        null-safe response. Unlike the scan decode it takes a urlPayloadJson the
        upstream fetches; the payer document is sourced from the CRM alias for
        the upstream decode header.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecodeURLQRBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecodeQRResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    DecodeURLQRBody:
      additionalProperties: false
      properties:
        accountId:
          description: >-
            The CRM account id of the scanning payer (sources the PI-PayerID
            document).
          type: string
        municipalityCode:
          description: Payer municipality code (codMun; cobv holiday calc).
          type: string
        payloadUrl:
          description: >-
            The payee-published JWS payload URL to decode (urlPayloadJson;
            schema-less).
          type: string
        paymentDate:
          description: Intended payment date (dPP; aaaa-mm-dd; cobv valorFinal calc).
          type: string
      required:
        - payloadUrl
        - accountId
      type: object
    DecodeQRResponse:
      additionalProperties: false
      properties:
        amount:
          description: The decoded amount in reais.
          format: double
          type: number
        amountTroco:
          description: The Pix Troco amount in reais (troco only).
          format: double
          type: number
        bankIdPss:
          description: The saque/troco PSS participant ISPB.
          format: int64
          type: integer
        description:
          description: Additional data (dadosAdicionais).
          type: string
        dueDate:
          description: Due date (cobv/static optional).
          type: string
        endToEndId:
          description: The SPI end-to-end id.
          type: string
        isPixSaque:
          description: Whether the QR carries a Pix Saque leg.
          type: boolean
        isPixTroco:
          description: Whether the QR carries a Pix Troco leg.
          type: boolean
        key:
          description: The recipient Pix key.
          type: string
        payee:
          $ref: '#/components/schemas/DecodePayeeResponse'
        qrCodeType:
          description: The decoded QR type (STATIC or DYNAMIC; cobv folds onto DYNAMIC).
          type: string
        txId:
          description: Conciliation id (idConciliacaoRecebedor).
          type: string
      required:
        - qrCodeType
        - amount
        - payee
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          nullable: true
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          format: uri
          type: string
        status:
          description: HTTP status code
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          format: uri
          type: string
      type: object
    DecodePayeeResponse:
      additionalProperties: false
      properties:
        accountDigit:
          description: Recipient account check digit (split from the wire account).
          type: string
        accountNumber:
          description: Recipient account number (split from the wire account).
          type: string
        accountType:
          description: Numeric eAccountType (0=Conta Corrente).
          format: int64
          type: integer
        bankId:
          description: Recipient participant ISPB.
          type: string
        branch:
          description: Recipient agency/branch.
          type: string
        document:
          description: Recipient document (CPF/CNPJ).
          type: string
        keyType:
          description: Numeric eKeyType (CPF=0,CNPJ=1,EMAIL=2,PHONE=3,RANDOM=4).
          format: int64
          type: integer
        name:
          description: Recipient holder name.
          type: string
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  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).

````