> ## Documentation Index
> Fetch the complete documentation index at: https://developers.portao3.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Report a Pix as a fraud

> Opens a Pix infraction report (MED) about a Pix the wallet sent: it tells the institution that received the money that the Pix was a fraud — for example, the organization paid a scammer — so that institution can analyze it, block the money and return it.

The transaction must be a Pix the wallet sent, with an end-to-end ID, and it can be reported only once. The report goes to the bank with `situationType` and `reportDetails`, and the answer is the infraction as recorded: `direction` `SENT`, `status` `CREATED`, with the bank's references in `external`. From then on the bank keeps it up to date — `status` moves to `OPEN`, `ACKNOWLEDGED` and finally `CLOSED` (with the conclusion in `analysisResult`) or `CANCELLED`, and the two sides appear in `reportParticipant` and `counterpartyParticipant`. Follow it with `GET .../transactions/{transactionId}/pix-infraction`. Opening the report doesn't move money: when the money is returned, it arrives as a Pix credited to the wallet.

When the bank refuses the report — or refuses Portão 3's sign-in to it — nothing is recorded and the answer carries the bank's own HTTP status, with the code `ERR_BAD_REQUEST` (a `4xx`) or `ERR_BAD_RESPONSE` (a `5xx`) and, unless the bank gave a message, `Request failed with status code` and the status: the bank answers `422` when it doesn't find the Pix. When the bank doesn't answer at all, the answer is a `500` whose code is the system's network error — `ECONNABORTED` when it took too long, `ECONNREFUSED`, `ENOTFOUND`, a certificate error such as `CERT_HAS_EXPIRED`, or another: that status's `code` is not limited to the listed ones. After a `5xx`, a dropped connection or a timeout, the bank may still have opened the report: it then shows up on the transaction once the bank updates it, so check `GET .../transactions/{transactionId}/pix-infraction` before sending it again.

Use `default` as `walletId` for the organization's main wallet.

Only Portão 3's own services and back office can open a Pix infraction report.


## OpenAPI

````yaml /api-reference/banking.openapi.json post /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/transactions/{transactionId}/pix-infraction
openapi: 3.0.3
info:
  title: Banking
  version: 1.0.0
  description: >-
    Portão 3 banking API. Every endpoint requires a bearer token in the
    Authorization header (Authorization: Bearer <token>) unless its page states
    otherwise; see the Authentication guide. That requirement is not repeated
    per endpoint. Generated by tools/openapi from code (routes + security) and
    the hand-written spec (request/response bodies). Banking attaches a zod
    validationSchema at the route; request bodies are resolved from it (object +
    array roots). Responses have no presenter layer, so they stay tier=unknown.
    Confidence tiers: generated:typed=300 copied:manual=0 unknown=20.
servers:
  - url: https://api.banking.v2.portao3.com.br/
    description: production
  - url: https://api.banking.dev.3pers.com.br/
    description: development
security: []
tags:
  - name: Accounts
  - name: Account Limits
  - name: Wallets
  - name: Transaction Limits
  - name: Transfers
  - name: Cards
  - name: Card Limits
  - name: Cards 3DS
  - name: Pix Payments
  - name: Pix Keys
  - name: PIX Charges
  - name: PIX Automatic
  - name: PIX Initiation (Open Finance)
  - name: PIX Infractions (MED)
  - name: Boleto Payments
  - name: Boleto Charges
  - name: TED Payments
  - name: Transactions
  - name: Transaction Reversals
  - name: Spend Review
  - name: Cashback
  - name: Currency Codes
paths:
  /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/transactions/{transactionId}/pix-infraction:
    post:
      tags:
        - PIX Infractions (MED)
      summary: Report a Pix as a fraud
      description: >-
        Opens a Pix infraction report (MED) about a Pix the wallet sent: it
        tells the institution that received the money that the Pix was a fraud —
        for example, the organization paid a scammer — so that institution can
        analyze it, block the money and return it.
      operationId: >-
        postRealmsByRealmIdOrganizationsByOrganizationIdAccountsByAccountIdWalletsByWalletIdTransactionsByTransactionIdPixInfraction
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of the realm.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
        - name: organizationId
          in: path
          required: true
          description: |-
            ID of the organization.

            Format: `UUID`
          schema:
            type: string
            format: uuid
          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
        - name: accountId
          in: path
          required: true
          description: ID of the organization's account (24 hexadecimal characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 66f2a1c7b4d3e80012c9a0b4
        - name: walletId
          in: path
          required: true
          description: >-
            ID of the wallet that sent the Pix (24 hexadecimal characters), or
            `default` for the organization's main wallet.
          schema:
            type: string
            pattern: ^([0-9a-fA-F]{24}|default)$
          example: 66f2a3d1b4d3e80012c9a0d2
        - name: transactionId
          in: path
          required: true
          description: >-
            ID of the outgoing Pix in the wallet's statement — the transaction's
            `_id` (24 hexadecimal characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 6726b1c2b4d3e80012c9a4f7
        - name: x-environment
          in: header
          required: false
          description: >-
            Environment of the transaction: `LIVE` (production) or `TEST`
            (sandbox). When you omit it, `TEST` is used; any other value is
            rejected.
          schema:
            type: string
            enum:
              - LIVE
              - TEST
          example: LIVE
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  enum:
                    - REFUND_REQUEST
                    - REFUND_CANCELLED
                  description: >-
                    Why the report is opened: send `REFUND_REQUEST` — it asks
                    for the money back. `REFUND_CANCELLED` is accepted too but
                    cancels nothing. Either is kept on the infraction until the
                    bank's first update, which sets the reason itself
                    (`REFUND_CANCELLED` once the report is cancelled).
                  example: REFUND_REQUEST
                situationType:
                  type: string
                  enum:
                    - SCAM
                    - ACCOUNT_TAKEOVER
                    - COERCION
                    - FRAUDULENT_ACCESS
                    - OTHER
                    - UNKNOWN
                  description: >-
                    What happened: `SCAM` — the payer was deceived into paying;
                    `ACCOUNT_TAKEOVER` — someone took over the payer's account;
                    `COERCION` — the payer was forced to pay;
                    `FRAUDULENT_ACCESS` — someone used the payer's account
                    without permission; `OTHER` — anything else. `UNKNOWN` is
                    reported as `OTHER`.
                  example: SCAM
                reportDetails:
                  type: string
                  minLength: 1
                  maxLength: 2000
                  description: >-
                    What happened, in your words — 1 to 2,000 characters. It
                    goes with the report to the institution that received the
                    Pix.
                  example: >-
                    A cliente pagou um falso fornecedor que se passou pela
                    Gráfica Aurora. O recebedor não entregou nada e não
                    responde.
              required:
                - reason
                - situationType
                - reportDetails
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    description: ID of the infraction (24 hexadecimal characters).
                    example: 6728e0a4b4d3e80012c9a6b1
                  environment:
                    type: string
                    enum:
                      - LIVE
                      - TEST
                    description: >-
                      Environment of the infraction: `LIVE` (production) or
                      `TEST` (sandbox).
                    example: LIVE
                  realmId:
                    type: string
                    description: ID of the realm.
                    example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                  organizationId:
                    type: string
                    description: ID of the organization.
                    example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                  accountId:
                    type: string
                    description: ID of the organization's account.
                    example: 66f2a1c7b4d3e80012c9a0b4
                  walletId:
                    type: string
                    description: ID of the wallet that sent or received the Pix.
                    example: 66f2a3d1b4d3e80012c9a0d2
                  transactionId:
                    type: string
                    description: ID of the Pix transaction in the wallet's statement.
                    example: 6726b1c2b4d3e80012c9a4f7
                  endToEndId:
                    type: string
                    description: >-
                      End-to-end ID of the Pix (32 characters). Absent or empty
                      on a few older reports.
                    example: E12345678202611031022p9Q8r7S6t5U
                  direction:
                    type: string
                    enum:
                      - SENT
                      - RECEIVED
                    description: >-
                      Which side the wallet is on: `RECEIVED` — another
                      institution reported a Pix the wallet received (the payer
                      says it was a fraud); `SENT` — Portão 3 reported a Pix the
                      wallet sent, at the organization's request.
                    example: SENT
                  reason:
                    type: string
                    enum:
                      - REFUND_REQUEST
                      - REFUND_CANCELLED
                    description: >-
                      `REFUND_REQUEST` — the report asks for the money back;
                      `REFUND_CANCELLED` — the bank marked the request as
                      cancelled. On a report Portão 3 just opened, until the
                      bank's first update, it is the value sent with it, and
                      cancels nothing. Some older cancelled reports still say
                      `REFUND_REQUEST`. Read `status` to know whether a report
                      was cancelled.
                    example: REFUND_REQUEST
                  situationType:
                    type: string
                    enum:
                      - SCAM
                      - ACCOUNT_TAKEOVER
                      - COERCION
                      - FRAUDULENT_ACCESS
                      - OTHER
                      - UNKNOWN
                    description: >-
                      What the report says happened: `SCAM` — the payer was
                      deceived into paying; `ACCOUNT_TAKEOVER` — someone took
                      over the payer's account; `COERCION` — the payer was
                      forced to pay; `FRAUDULENT_ACCESS` — someone used the
                      payer's account without permission; `OTHER` — anything
                      else, or not stated. `UNKNOWN` appears only on a report
                      you just opened with it, until the bank's first update (it
                      is reported as `OTHER`).
                    example: SCAM
                  reportDetails:
                    type: string
                    nullable: true
                    description: >-
                      What happened, in the reporter's words. Empty or `null` on
                      some older reports.
                    example: >-
                      A cliente pagou um falso fornecedor que se passou pela
                      Gráfica Aurora. O recebedor não entregou nada e não
                      responde.
                  external:
                    type: object
                    properties:
                      infractionId:
                        type: string
                        description: >-
                          The bank's ID of the report. Empty on some older
                          reports.
                        example: 3f9c2a71-8d4e-4b6a-9e15-2c7d0b8a4f63
                      fraudMarkerId:
                        type: string
                        description: >-
                          A second reference the bank gives the report. Empty
                          when the bank sent none.
                        example: b7e14c90-2f3a-4d8b-a6c5-91e0d3f72b48
                    required:
                      - infractionId
                      - fraudMarkerId
                    description: References of the report at the bank.
                  status:
                    type: string
                    enum:
                      - OPEN
                      - ACKNOWLEDGED
                      - CLOSED
                      - CANCELLED
                      - CREATED
                    description: >-
                      Where the report stands: `CREATED` — just opened by Portão
                      3, until the bank's first update; `OPEN` — opened, waiting
                      for the receiver's institution; `ACKNOWLEDGED` — the
                      receiver's institution is analyzing it; `CLOSED` — the
                      analysis is over (see `analysisResult`); `CANCELLED` — the
                      report was withdrawn. `CLOSED` and `CANCELLED` are final.
                    example: CREATED
                  reportParticipant:
                    type: object
                    properties:
                      id:
                        type: string
                        description: >-
                          Code of the institution that opened the report, as the
                          bank sent it on some older reports (without leading
                          zeros). Empty or absent on the others — read
                          `bankIspb`.
                        example: ''
                      bankIspb:
                        type: string
                        description: ISPB (8 digits) of the payer's institution.
                        example: '12345678'
                      name:
                        type: string
                        description: Name of the payer.
                        example: Mariana Souza
                      email:
                        type: string
                        description: >-
                          Contact e-mail of the institution that opened the
                          report, on some older reports only. Empty or absent on
                          the others.
                        example: ''
                      phone:
                        type: string
                        description: >-
                          Contact phone of the institution that opened the
                          report, as that institution wrote it (not in a
                          standard format), on some older reports only. Empty or
                          absent on the others.
                        example: ''
                    description: The side that opened the report (the payer's).
                  counterpartyParticipant:
                    type: object
                    properties:
                      id:
                        type: string
                        description: >-
                          Code of the receiving institution, as the bank sent it
                          on some older reports. Empty or absent on the others.
                        example: ''
                      bankIspb:
                        type: string
                        description: >-
                          ISPB (8 digits) of the receiver's institution, when
                          known.
                        example: '87654321'
                      name:
                        type: string
                        description: Name of the receiver, when known. Often empty.
                        example: Gráfica Aurora Ltda
                    description: The side the report is against (the receiver's).
                  analysisResult:
                    type: string
                    enum:
                      - AGREED
                      - DISAGREED
                      - PENDING
                    description: >-
                      The receiver's institution's conclusion: `AGREED` — it
                      agrees the Pix was a fraud; `DISAGREED` — it doesn't;
                      `PENDING` — no conclusion recorded. Final only once
                      `status` is `CLOSED`: on a report you received it can
                      already say `AGREED` while the report is `OPEN` or
                      `ACKNOWLEDGED`.
                    example: PENDING
                  analysisDetails:
                    type: string
                    description: >-
                      Notes of the analysis, when the receiver's institution
                      wrote any. Empty otherwise.
                    example: ''
                  effectiveAt:
                    type: string
                    description: >-
                      When the report was opened at the bank (ISO 8601, UTC).
                      Not always the bank's time: on a report Portão 3 just
                      opened (until the bank's first update) and on the records
                      written when a wallet is blocked for fraud, it is when the
                      record was written — on some older ones, a moment before
                      it.
                    example: '2026-11-04T14:02:37.115Z'
                  changedAt:
                    type: string
                    description: >-
                      When the report's last change was recorded (ISO 8601,
                      UTC). On a few older reports that never recorded one, the
                      time of your request.
                    example: '2026-11-04T14:02:37.115Z'
                  createdAt:
                    type: string
                    description: When the infraction was recorded (ISO 8601, UTC).
                    example: '2026-11-04T14:02:37.120Z'
                    format: date-time
                  updatedAt:
                    type: string
                    description: When the infraction was last updated (ISO 8601, UTC).
                    example: '2026-11-04T14:02:37.120Z'
                    format: date-time
                  __v:
                    type: number
                    description: Internal version of the record.
                    example: 0
                required:
                  - _id
                  - environment
                  - realmId
                  - organizationId
                  - accountId
                  - walletId
                  - transactionId
                  - direction
                  - reason
                  - situationType
                  - reportDetails
                  - external
                  - status
                  - analysisResult
                  - analysisDetails
                  - effectiveAt
                  - changedAt
                  - createdAt
                  - updatedAt
                  - __v
                description: >-
                  A Pix infraction report (MED — the Central Bank's special
                  refund mechanism): a claim that a Pix was a fraud, opened by
                  the payer's institution against the receiver's so the money
                  can be blocked and returned. `direction` says which side the
                  wallet is on.
        '400':
          description: >-
            `PIX_INFRACTION_INVALID_TRANSACTION` — The transaction isn't a Pix
            the wallet sent, or it has no end-to-end ID.


            `ERR_BAD_REQUEST` — The bank rejected the report's data. Nothing is
            recorded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - PIX_INFRACTION_INVALID_TRANSACTION
                      - ERR_BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: PIX_INFRACTION_INVALID_TRANSACTION
                origin: BANKING
                message: Pix Infraction invalid transaction
        '401':
          description: >-
            `ERR_BAD_REQUEST` — The bank didn't accept Portão 3's sign-in.
            Nothing is recorded; retry.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - ERR_BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ERR_BAD_REQUEST
                origin: BANKING
                message: Request failed with status code 401
        '403':
          description: >-
            `USER_NOT_HAVE_WALLET_PERMISSION` — You are not a Portão 3 service
            or back-office operator.


            `ERR_BAD_REQUEST` — The bank refused Portão 3's access (the message
            may be the bank's own). Nothing is recorded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - USER_NOT_HAVE_WALLET_PERMISSION
                      - ERR_BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: USER_NOT_HAVE_WALLET_PERMISSION
                origin: BANKING
                message: You do not have permission to perform this action
        '404':
          description: >-
            `ACCOUNT_NOT_FOUND` — No account with this ID exists in the
            organization.


            `WALLET_NOT_FOUND` — No wallet with this ID exists in the account
            and environment — or, with `walletId` `default`, the account has no
            main wallet in this environment.


            `TRANSACTION_NOT_FOUND` — The wallet has no transaction with this ID
            in this environment.


            `ERR_BAD_REQUEST` — The bank answered that something it needs wasn't
            found. Nothing is recorded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - ACCOUNT_NOT_FOUND
                      - WALLET_NOT_FOUND
                      - TRANSACTION_NOT_FOUND
                      - ERR_BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ACCOUNT_NOT_FOUND
                origin: BANKING
                message: Account not found
        '409':
          description: >-
            `PIX_INFRACTION_ALREADY_EXISTS` — The transaction already has an
            infraction. Nothing is sent to the bank.


            `ERR_BAD_REQUEST` — The bank refused the report as a conflict.
            Nothing is recorded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - PIX_INFRACTION_ALREADY_EXISTS
                      - ERR_BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: PIX_INFRACTION_ALREADY_EXISTS
                origin: BANKING
                message: Pix Infraction already exists
        '422':
          description: >-
            `BAD_REQUEST` — A path or body field is invalid — for example an
            unknown `situationType` or an empty `reportDetails`; `fields` lists
            each one.


            `ERR_BAD_REQUEST` — The bank refused the report — for example, it
            didn't find the Pix. Nothing is recorded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                      - ERR_BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                  fields:
                    type: array
                    description: >-
                      One entry per invalid request field (validation errors
                      only); `null` on an error relayed as-is from upstream.
                    nullable: true
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            Path of the invalid field, e.g. `label` or
                            `values[0].value`.
                          example: label
                        message:
                          type: string
                          description: Why the field was rejected.
                          example: label is required
                        code:
                          type: string
                          description: >-
                            `<FIELD>_<REASON>` — e.g. `LABEL_REQUIRED`,
                            `TYPE_ONE_OF`, `VALUES_VALUE_TYPE_ERROR`.
                          example: LABEL_REQUIRED
                        values:
                          type: array
                          items:
                            type: string
                          description: >-
                            The accepted values, when the field is an
                            enumeration.
                      required:
                        - field
                        - message
                        - code
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: BAD_REQUEST
                origin: BANKING
                message: >-
                  Bad Request: Your request is invalid or incomplete. Please
                  make sure you are requesting with the right fields.
                fields:
                  - field: reason
                    message: >-
                      Invalid option: expected one of
                      "REFUND_REQUEST"|"REFUND_CANCELLED"
                    code: REASON_ONE_OF
                    values:
                      - REFUND_REQUEST
                      - REFUND_CANCELLED
        '429':
          description: >-
            `ERR_BAD_REQUEST` — Too many requests reached the bank — the report
            or Portão 3's sign-in to it. Nothing is recorded; retry shortly.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - ERR_BAD_REQUEST
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ERR_BAD_REQUEST
                origin: BANKING
                message: Request failed with status code 429
        '500':
          description: >-
            `ERR_BAD_RESPONSE` — The bank failed while handling the report or
            Portão 3's sign-in (the message may be the bank's own). It may still
            have opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.


            `ECONNABORTED` — The bank didn't answer in time; the message gives
            the time waited. It may still have opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.


            `ECONNRESET` — The connection to the bank dropped. It may still have
            opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.


            `EPIPE` — The connection to the bank broke while the report was
            being sent. It may still have opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.


            `ETIMEDOUT` — The connection to the bank timed out. It may still
            have opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.


            `ECONNREFUSED` — The bank refused the connection. Nothing was sent;
            retry.


            `ENOTFOUND` — The bank's address couldn't be resolved. Nothing was
            sent; retry.


            `EAI_AGAIN` — The bank's address couldn't be resolved for now.
            Nothing was sent; retry.


            `EHOSTUNREACH` — The bank couldn't be reached. Nothing was sent;
            retry.


            `ENETUNREACH` — The network to the bank was unreachable. Nothing was
            sent; retry.


            `CERT_HAS_EXPIRED` — The bank's security certificate had expired, so
            the connection was refused. Nothing was sent; retry later.


            `ERR_TLS_CERT_ALTNAME_INVALID` — The bank's security certificate
            didn't match its address, so the connection was refused. Nothing was
            sent; retry later.


            `INTERNAL_SERVER_ERROR` — An unexpected failure on Portão 3's side —
            for example, signing in to the bank took too long. The report may
            have reached the bank: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again. If it persists, contact support with the
            `traceId`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`. On a network failure relayed as-is, the
                      system's own error code: one of those this response lists,
                      or another.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ERR_BAD_RESPONSE
                origin: BANKING
                message: Request failed with status code 500
        '502':
          description: >-
            `ERR_BAD_RESPONSE` — The bank was unavailable while handling the
            report or Portão 3's sign-in (the message may be the bank's own). It
            may still have opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - ERR_BAD_RESPONSE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ERR_BAD_RESPONSE
                origin: BANKING
                message: Request failed with status code 502
        '503':
          description: >-
            `ERR_BAD_RESPONSE` — The bank was unavailable while handling the
            report or Portão 3's sign-in (the message may be the bank's own). It
            may still have opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - ERR_BAD_RESPONSE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ERR_BAD_RESPONSE
                origin: BANKING
                message: Request failed with status code 503
        '504':
          description: >-
            `ERR_BAD_RESPONSE` — The bank timed out while handling the report or
            Portão 3's sign-in (the message may be the bank's own). It may still
            have opened the report: check `GET
            .../transactions/{transactionId}/pix-infraction` later before
            sending it again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  traceId:
                    type: string
                    description: >-
                      Identifier of the request that failed. Quote it when
                      contacting support.
                    example: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                  code:
                    type: string
                    enum:
                      - ERR_BAD_RESPONSE
                    description: >-
                      Stable, machine-readable error code. Branch on this, never
                      on `message`.
                  origin:
                    type: string
                    enum:
                      - BANKING
                    description: Service that produced the error.
                  message:
                    type: string
                    description: >-
                      Human-readable explanation. Its wording may change without
                      notice.
                required:
                  - traceId
                  - code
                  - origin
                  - message
              example:
                traceId: 1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b
                code: ERR_BAD_RESPONSE
                origin: BANKING
                message: Request failed with status code 504

````

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