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

# Crear un reporte de infracción

> Usa este endpoint para reportar infracciones asociadas a transferencias
Pix. Este endpoint debe usarse cuando hay un fraude relacionado con una
transacción en escenarios donde el cliente es el PSP del pagador, es
decir, cuando la transacción fue iniciada y enviada desde una cuenta
dentro de tu arreglo.


**Notas:**

- Las transacciones solo pueden reportarse dentro de los 90 días desde la
fecha de la transacción.



## OpenAPI

````yaml es/openapi/v3-current/indirect-pix.yaml POST /v1/dict/infraction-reports
openapi: 3.0.3
info:
  title: Plugin BR Pix Indirect - API completa
  description: |
    API completa para el sistema de pagos instantáneos Pix de Brasil, que
    incluye operaciones del diccionario de claves Pix, generación/decodificación
    de códigos QR, transacciones y límites transaccionales.
  version: 1.0.0
servers:
  - url: https://plugin-pix-indirect.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/dict/infraction-reports:
    post:
      tags:
        - MED API
      summary: Crear un reporte de infracción
      description: >-
        Usa este endpoint para reportar infracciones asociadas a transferencias

        Pix. Este endpoint debe usarse cuando hay un fraude relacionado con una

        transacción en escenarios donde el cliente es el PSP del pagador, es

        decir, cuando la transacción fue iniciada y enviada desde una cuenta

        dentro de tu arreglo.



        **Notas:**


        - Las transacciones solo pueden reportarse dentro de los 90 días desde
        la

        fecha de la transacción.
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInfractionReportInput'
            example:
              transactionId: E12345678202411241430ABCDEFGHIJK
              reason: REFUND_REQUEST
              situationType: SCAM
              reportDetails: Customer reported receiving a call from fake bank employee
      responses:
        '201':
          description: Reporte de infracción creado correctamente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InfractionReportObject'
        '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'
                ErrorPIX0201:
                  $ref: '#/components/examples/ErrorPIX0201'
                ErrorPIX0202:
                  $ref: '#/components/examples/ErrorPIX0202'
                ErrorPIX0203:
                  $ref: '#/components/examples/ErrorPIX0203'
                ErrorPIX0205:
                  $ref: '#/components/examples/ErrorPIX0205'
                ErrorPIX0212:
                  $ref: '#/components/examples/ErrorPIX0212'
                ErrorPIX0215:
                  $ref: '#/components/examples/ErrorPIX0215'
                ErrorPIX0219:
                  $ref: '#/components/examples/ErrorPIX0219'
                ErrorPIX0221:
                  $ref: '#/components/examples/ErrorPIX0221'
                ErrorPIX0222:
                  $ref: '#/components/examples/ErrorPIX0222'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0213:
                  $ref: '#/components/examples/ErrorPIX0213'
                ErrorPIX0214:
                  $ref: '#/components/examples/ErrorPIX0214'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0211:
                  $ref: '#/components/examples/ErrorPIX0211'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0204:
                  $ref: '#/components/examples/ErrorPIX0204'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX0000:
                  $ref: '#/components/examples/ErrorPIX0000'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                ErrorPIX1000:
                  $ref: '#/components/examples/ErrorPIX1000'
                ErrorPIX1007:
                  $ref: '#/components/examples/ErrorPIX1007'
                ErrorPIX1099:
                  $ref: '#/components/examples/ErrorPIX1099'
      deprecated: false
      security:
        - bearerAuth: []
components:
  schemas:
    CreateInfractionReportInput:
      type: object
      required:
        - transactionId
        - reason
      properties:
        transactionId:
          type: string
          description: Identificador de transacción del SPI.
          example: E12345678202411241430ABCDEFGHIJK
        reason:
          type: string
          description: Motivo de la infracción.
          enum:
            - REFUND_REQUEST
            - REFUND_CANCELLED
          example: REFUND_REQUEST
        situationType:
          type: string
          description: Tipo de situación de fraude.
          example: SCAM
        reportDetails:
          type: string
          description: Descripción detallada de la infracción.
          example: Customer reported receiving a call from fake bank employee
    InfractionReportObject:
      type: object
      properties:
        id:
          type: string
          description: Identificador único.
          example: 019c96a0-0c98-799e-9135-4613ca469ad8
        transactionId:
          type: string
          description: Identificador de transacción del SPI.
          example: E12345678202411241430ABCDEFGHIJK
        status:
          type: string
          description: Estado actual.
          enum:
            - OPEN
            - ACKNOWLEDGED
            - CLOSED
            - CANCELLED
          example: OPEN
        reason:
          type: string
          description: Motivo de la infracción.
          example: REFUND_REQUEST
        reporterParticipant:
          type: string
          description: ISPB del participante que reporta.
          example: '12345678'
        counterpartyParticipant:
          type: string
          description: ISPB de la contraparte.
          example: '87654321'
        analysisResult:
          type: string
          description: Resultado del análisis de BACEN.
          example: AGREED
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
    ErrorFormat:
      type: object
      description: El mensaje de error de la respuesta.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: Un identificador único y estable para el error.
        title:
          type: string
          description: Un breve resumen del problema.
        message:
          type: string
          description: Orientación detallada para resolver el 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.
    ErrorPIX0201:
      summary: Report Details Too Long
      value:
        code: PIX-0201
        title: Report Details Too Long
        message: >-
          The report details exceed the maximum allowed length of 2000
          characters.
    ErrorPIX0202:
      summary: Invalid Email Format
      value:
        code: PIX-0202
        title: Invalid Email Format
        message: The email format is invalid.
    ErrorPIX0203:
      summary: Invalid Phone Format
      value:
        code: PIX-0203
        title: Invalid Phone Format
        message: The phone format is invalid.
    ErrorPIX0205:
      summary: Invalid Transaction ID Format
      value:
        code: PIX-0205
        title: Invalid Transaction ID Format
        message: The transaction ID format must match a E2E ID format.
    ErrorPIX0212:
      summary: Transaction Too Old
      value:
        code: PIX-0212
        title: Transaction Too Old
        message: The transaction occurred more than 80 days ago and cannot be reported.
    ErrorPIX0215:
      summary: Invalid Transaction Type
      value:
        code: PIX-0215
        title: Invalid Transaction Type
        message: >-
          The transaction is not a refund transaction. Cancellation of refund
          infractions can only be used for refund transactions (pacs.004).
    ErrorPIX0219:
      summary: Invalid ID Format
      value:
        code: PIX-0219
        title: Invalid ID Format
        message: The ID must be a valid UUID format.
    ErrorPIX0221:
      summary: Refund Transaction Too Old
      value:
        code: PIX-0221
        title: Refund Transaction Too Old
        message: >-
          The refund transaction occurred more than 30 days ago and cannot be
          reported for cancellation.
    ErrorPIX0222:
      summary: Invalid Situation Type
      value:
        code: PIX-0222
        title: Invalid Situation Type
        message: Refund cancellation infraction reports must use situationType OTHER.
    ErrorPIX0213:
      summary: Unauthorized to Open Refund Request
      value:
        code: PIX-0213
        title: Unauthorized to Open Refund Request
        message: >-
          A refund request infraction report can only be opened by the payer's
          PSP.
    ErrorPIX0214:
      summary: Unauthorized to Open Cancellation Report
      value:
        code: PIX-0214
        title: Unauthorized to Open Cancellation Report
        message: >-
          A cancellation of refund infraction report can only be opened by the
          payee's PSP.
    ErrorPIX0211:
      summary: Transaction Not Found
      value:
        code: PIX-0211
        title: Transaction Not Found
        message: The specified transaction was not found.
    ErrorPIX0204:
      summary: Duplicate Infraction Report
      value:
        code: PIX-0204
        title: Duplicate Infraction Report
        message: An infraction report already exists for this transaction.
    ErrorPIX0000:
      summary: Internal Server Error
      value:
        code: PIX-0000
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
    ErrorPIX1000:
      summary: Provider Connection Error
      value:
        code: PIX-1000
        title: Provider Connection Error
        message: Failed to connect to provider.
    ErrorPIX1007:
      summary: Provider Internal Error
      value:
        code: PIX-1007
        title: Provider Internal Error
        message: Provider returned an internal error.
    ErrorPIX1099:
      summary: Provider Unmapped Error
      value:
        code: PIX-1099
        title: Provider Unmapped Error
        message: Provider returned an unmapped error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````