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

# Resolve a dynamic BR Code (payer side)

> Fetches the payload at the dynamic QR's location over HTTPS and returns the charge only after the site certificate is on the BC list of authorised QR certificates (certqrc), is EV and unrevoked, the JWS signing certificate chain is valid and unrevoked, and the signature verifies. 422: the QR is invalid or not dynamic, its location is not an acceptable HTTPS URL, the receiver refused the request (charge gone, codMun/DPP refused), the signed payload does not follow the API Pix layout, or the charge cannot take a payment (status other than ATIVA, or a cob past calendario.expiracao; the detail names which). 502: the receiver gave no verdict: the location, its JWK Set or a revocation status could not be read (unreachable, 5xx, or a receiver that throttled, timed out or blocked the request: 401, 403, 408, 429), the caller's X-Caller-Budget-Ms ran out, or the site certificate, the signing certificate or the signature fails the checks above. 503: the feature is off or the certificate list is unreadable.



## OpenAPI

````yaml /pt/openapi/v3-current/spi-brcode.yaml post /api/v1/brcode/resolve
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: BR Code service for QR code generation and decoding (EMV QRCPS-MPM).
  license:
    name: Lerian Studio General License
  title: Lerian SPI — BR Code API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security: []
tags:
  - description: EMV BR Code payload generation, decoding, validation, info, and lookup.
    name: BRCode
  - description: >-
      Pix charges (Cob/CobV/LoteCobV): create, retrieve by TxID, list, cancel,
      reconcile, and resolve public payloads.
    name: Charges
  - description: >-
      Flow (mandatory order): create cob/cobv → generate QR/payload. A dynamic
      BR Code payload references a charge, so the cob/cobv charge MUST be
      created first; the payload links to it by txid/locator.
    name: charge
paths:
  /api/v1/brcode/resolve:
    post:
      tags:
        - BRCode
      summary: Resolve a dynamic BR Code (payer side)
      description: >-
        Fetches the payload at the dynamic QR's location over HTTPS and returns
        the charge only after the site certificate is on the BC list of
        authorised QR certificates (certqrc), is EV and unrevoked, the JWS
        signing certificate chain is valid and unrevoked, and the signature
        verifies. 422: the QR is invalid or not dynamic, its location is not an
        acceptable HTTPS URL, the receiver refused the request (charge gone,
        codMun/DPP refused), the signed payload does not follow the API Pix
        layout, or the charge cannot take a payment (status other than ATIVA, or
        a cob past calendario.expiracao; the detail names which). 502: the
        receiver gave no verdict: the location, its JWK Set or a revocation
        status could not be read (unreachable, 5xx, or a receiver that
        throttled, timed out or blocked the request: 401, 403, 408, 429), the
        caller's X-Caller-Budget-Ms ran out, or the site certificate, the
        signing certificate or the signature fails the checks above. 503: the
        feature is off or the certificate list is unreadable.
      operationId: resolveBRCode
      parameters:
        - description: >-
            Milliseconds the whole resolve may take (location, JWK Set and
            revocation reads); once spent, the route answers 502 (no verdict).
            Omitted, each fetch is bounded at 5 s.
          in: header
          name: X-Caller-Budget-Ms
          schema:
            description: >-
              Milliseconds the whole resolve may take (location, JWK Set and
              revocation reads); once spent, the route answers 502 (no verdict).
              Omitted, each fetch is bounded at 5 s.
            format: int64
            maximum: 15000
            minimum: 100
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveBRCodeHumaInputBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payload'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        '502':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Gateway
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Service Unavailable
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    ResolveBRCodeHumaInputBody:
      additionalProperties: false
      properties:
        codMun:
          description: >-
            cobv only: the payer's IBGE municipality code. Omit only when the
            account type gives the PSP no address.
          pattern: ^[0-9]{7}$
          type: string
        dpp:
          description: >-
            cobv only: intended payment date (YYYY-MM-DD). Omitted, the receiver
            assumes the due date, or today once overdue.
          format: date
          type: string
        raw:
          description: The scanned BR Code (or Pix Copia e Cola) of a dynamic QR.
          minLength: 1
          type: string
      required:
        - raw
      type: object
    Payload:
      additionalProperties: false
      properties:
        amount:
          description: >-
            Amount as presented: valor.original + saque + troco (cob) or
            valor.final (cobv). With modalidadeAlteracao 1 the payer may change
            it.
          type: string
        calendario:
          $ref: '#/components/schemas/Calendar'
        chave:
          type: string
        devedor:
          $ref: '#/components/schemas/Party'
        expiresAt:
          description: 'cob only: calendario.criacao + calendario.expiracao.'
          format: date-time
          type: string
        infoAdicionais:
          items:
            $ref: '#/components/schemas/AdditionalInfo'
          type:
            - array
            - 'null'
        jws:
          description: >-
            The signed payload as served (JWS compact), kept as the payment's
            evidence.
          type: string
        kind:
          description: cob (immediate) or cobv (due date).
          type: string
        recebedor:
          $ref: '#/components/schemas/Party'
        revisao:
          format: int64
          type: integer
        signingChain:
          description: >-
            The verified JWS signing certificate chain, leaf first, each
            certificate base64 DER (as a JWK x5c). Keep it with the JWS: it
            carries the public key the signature verified against.
          items:
            contentEncoding: base64
            type: string
          type: array
        solicitacaoPagador:
          type: string
        status:
          type: string
        txid:
          type: string
        valor:
          $ref: '#/components/schemas/Amounts'
      required:
        - kind
        - amount
        - jws
        - signingChain
        - revisao
        - calendario
        - valor
        - chave
        - txid
        - status
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        correlationId:
          description: Request-scoped correlation identifier echoing X-Request-ID.
          examples:
            - req-7a3f9c2e
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          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.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      required:
        - correlationId
      type: object
    Calendar:
      additionalProperties: false
      properties:
        apresentacao:
          type: string
        criacao:
          type: string
        dataDeVencimento:
          type: string
        expiracao:
          format: int64
          type: integer
        validadeAposVencimento:
          format: int64
          type: integer
      required:
        - criacao
        - apresentacao
      type: object
    Party:
      additionalProperties: false
      properties:
        cep:
          type: string
        cidade:
          type: string
        cnpj:
          type: string
        cpf:
          type: string
        logradouro:
          type: string
        nome:
          type: string
        nomeFantasia:
          type: string
        uf:
          type: string
      type: object
    AdditionalInfo:
      additionalProperties: false
      properties:
        nome:
          type: string
        valor:
          type: string
      required:
        - nome
        - valor
      type: object
    Amounts:
      additionalProperties: false
      properties:
        abatimento:
          type: string
        desconto:
          type: string
        final:
          type: string
        juros:
          type: string
        modalidadeAlteracao:
          format: int64
          type: integer
        multa:
          type: string
        original:
          type: string
        retirada:
          $ref: '#/components/schemas/Withdrawal'
      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
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
    Withdrawal:
      additionalProperties: false
      properties:
        saque:
          $ref: '#/components/schemas/WithdrawalLeg'
        troco:
          $ref: '#/components/schemas/WithdrawalLeg'
      type: object
    WithdrawalLeg:
      additionalProperties: false
      properties:
        modalidadeAgente:
          type: string
        modalidadeAlteracao:
          format: int64
          type: integer
        prestadorDoServicoDeSaque:
          type: string
        valor:
          type: string
      required:
        - valor
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.