> ## 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 an Infraction Report

> Use this endpoint to report infractions associated to Pix transfers.
This endpoint must be used when there is a fraud related to a
transaction in scenarios where the client is the payer PSP, meaning the
transaction was initiated and sent from an account within your
arrangement.


**Notes:**

- Transactions can only be reported within 90 days from the transaction
date.



## OpenAPI

````yaml /en/openapi/v3-current/indirect-pix.yaml post /v1/dict/infraction-reports
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/dict/infraction-reports:
    post:
      tags:
        - MED API
      summary: Create an Infraction Report
      description: |-
        Use this endpoint to report infractions associated to Pix transfers.
        This endpoint must be used when there is a fraud related to a
        transaction in scenarios where the client is the payer PSP, meaning the
        transaction was initiated and sent from an account within your
        arrangement.


        **Notes:**

        - Transactions can only be reported within 90 days from the transaction
        date.
      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: Infraction report created successfully.
          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: SPI transaction identifier.
          example: E12345678202411241430ABCDEFGHIJK
        reason:
          type: string
          description: Infraction reason.
          enum:
            - REFUND_REQUEST
            - REFUND_CANCELLED
          example: REFUND_REQUEST
        situationType:
          type: string
          description: Type of fraud situation.
          example: SCAM
        reportDetails:
          type: string
          description: Detailed description of the infraction.
          example: Customer reported receiving a call from fake bank employee
    InfractionReportObject:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier.
          example: 019c96a0-0c98-799e-9135-4613ca469ad8
        transactionId:
          type: string
          description: SPI transaction identifier.
          example: E12345678202411241430ABCDEFGHIJK
        status:
          type: string
          description: Current status.
          enum:
            - OPEN
            - ACKNOWLEDGED
            - CLOSED
            - CANCELLED
          example: OPEN
        reason:
          type: string
          description: Infraction reason.
          example: REFUND_REQUEST
        reporterParticipant:
          type: string
          description: ISPB of the reporting participant.
          example: '12345678'
        counterpartyParticipant:
          type: string
          description: ISPB of the counterparty.
          example: '87654321'
        analysisResult:
          type: string
          description: BACEN analysis result.
          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: 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.
    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

````