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

# Conciliar cobranza

> Endpoint exclusivo para administradores que marca una cobranza como pagada por su ID de transacción, registrando la marca de tiempo del pago.



## OpenAPI

````yaml es/openapi/v3-current/spi-brcode.yaml post /api/v1/brcode/charges/reconcile
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Servicio de BR Code para la generación y decodificación de códigos QR (EMV
    QRCPS-MPM).
  license:
    name: Lerian Studio General License
  title: Lerian SPI — BR Code API
  version: 1.0.0
servers:
  - url: https://spi.sandbox.lerian.net
security: []
tags:
  - description: >-
      Generación, decodificación, validación, información y consulta de payloads
      de BR Code EMV.
    name: BRCode
  - description: >-
      Cobranzas Pix (Cob/CobV/LoteCobV): crear, consultar por TxID, listar,
      cancelar, conciliar y resolver payloads públicos.
    name: Charges
  - description: >-
      Flujo (orden obligatorio): crear cob/cobv → generar QR/payload. Un payload
      dinámico de BR Code hace referencia a una cobranza, por lo que la cobranza
      cob/cobv DEBE crearse primero; el payload se vincula a ella mediante
      txid/locator.
    name: charge
paths:
  /api/v1/brcode/charges/reconcile:
    post:
      tags:
        - Charges
      summary: Conciliar cobranza
      description: >-
        Endpoint exclusivo para administradores que marca una cobranza como
        pagada por su ID de transacción, registrando la marca de tiempo del
        pago.
      operationId: reconcileCharge
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReconcileChargeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChargeResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    ReconcileChargeRequest:
      additionalProperties: false
      properties:
        txId:
          description: Transaction identifier of the charge to mark as paid.
          examples:
            - txid-cobv-001
          type: string
      required:
        - txId
      type: object
    ChargeResponse:
      additionalProperties: false
      properties:
        amount:
          description: Original charge amount in BRL as a decimal string, scale 2.
          examples:
            - '250.00'
          type: string
        chargeType:
          description: >-
            Charge type: COB (immediate), COBV (due-date), or LoteCobV batch
            item.
          examples:
            - COB
          type: string
        createdAt:
          description: Creation timestamp in RFC3339 UTC.
          examples:
            - '2025-03-07T14:30:00Z'
          type: string
        discountAmount:
          description: >-
            Configured early-payment discount in BRL as a decimal string, scale
            2; empty for none.
          examples:
            - '10.00'
          type: string
        dueAt:
          description: >-
            Due date for due-date charges (COBV) as an RFC3339 UTC timestamp;
            null for immediate charges.
          examples:
            - '2025-03-15T23:59:59Z'
          type: string
        expiresAt:
          description: >-
            Immediate-charge (COB) expiry as an RFC3339 UTC timestamp; null when
            not applicable.
          examples:
            - '2025-03-08T23:59:59Z'
          type: string
        id:
          description: Server-assigned charge identifier (UUID).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        interestPercent:
          description: >-
            Configured monthly interest as a percentage decimal string (e.g.
            "1.00" = 1%); empty for none.
          examples:
            - '1.00'
          type: string
        merchantCity:
          description: Merchant city on the charge.
          examples:
            - São Paulo
          type: string
        merchantName:
          description: Merchant legal/trade name on the charge.
          examples:
            - Lerian Studio
          type: string
        paidAt:
          description: >-
            Settlement timestamp as an RFC3339 UTC timestamp; null until the
            charge is reconciled as paid.
          examples:
            - '2025-03-08T10:15:00Z'
          type: string
        payableAmount:
          description: >-
            Amount payable at the reference time in BRL, scale 2, after
            discount/penalty/interest; empty when not computed.
          examples:
            - '252.50'
          type: string
        payloadLocation:
          description: >-
            Resolvable payload location URL for the dynamic charge QR (empty
            when unavailable).
          examples:
            - https://pix.example.com/qr/v2/txid-cobv-001
          type: string
        penaltyPercent:
          description: >-
            Configured late-payment penalty as a percentage decimal string (e.g.
            "2.00" = 2%); empty for none.
          examples:
            - '2.00'
          type: string
        pixKey:
          description: Pix key of the receiver settling the charge.
          examples:
            - '12345678901'
          type: string
        rawPayload:
          description: >-
            Raw EMV copy-and-paste payload string for the charge (empty when
            unavailable).
          examples:
            - 00020126580014br.gov.bcb.pix...
          type: string
        status:
          description: >-
            Charge lifecycle status (ATIVA, CONCLUIDA,
            REMOVIDA_PELO_USUARIO_RECEBEDOR, REMOVIDA_PELO_PSP).
          examples:
            - ATIVA
          type: string
        txId:
          description: Merchant transaction identifier for the charge.
          examples:
            - txid-cobv-001
          type: string
        updatedAt:
          description: Last-update timestamp in RFC3339 UTC.
          examples:
            - '2025-03-07T14:30:00Z'
          type: string
      required:
        - id
        - txId
        - chargeType
        - amount
        - status
        - merchantName
        - merchantCity
        - pixKey
        - createdAt
        - updatedAt
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          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
      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:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````