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

# List an authorization's history

> Lists the events of a Pix Automático authorization and of its charges, newest first: its creation and each cancellation, each update from the payer's bank and each step Portão 3 took — with the failure, on the events that record one. A change of a charge's amount is not recorded.

Filter by charge (`pixBillingAutomaticItemId`), by `code`, `origin`, `flow` (the `flowCode`) and `eventNature`, which take their values comma-separated (`?eventNature=SUCCESS,ERROR`), and by period (`startAt`, `endAt`); sort with `order` and page with `limit` + `next`. Filtering by `pixBillingAutomaticItemId` leaves out the events of sending a charge to the payer's bank, which don't record the charge; and look for failures in `error`, not only in `ERROR` events. The events of both environments are listed. An unknown authorization has none: the page is empty.

Any member of the organization can list them.


## OpenAPI

````yaml /api-reference/banking.openapi.json get /realms/{realmId}/organizations/{organizationId}/pix-billing-automatic/{pixBillingAutomaticId}/history
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=320 copied:manual=0 unknown=8.
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 Billing
  - name: TED Payments
  - name: Transactions
  - name: Transaction Reversals
  - name: Spend Review
  - name: Cashback
  - name: Currency Codes
paths:
  /realms/{realmId}/organizations/{organizationId}/pix-billing-automatic/{pixBillingAutomaticId}/history:
    get:
      tags:
        - PIX Automatic
      summary: List an authorization's history
      description: >-
        Lists the events of a Pix Automático authorization and of its charges,
        newest first: its creation and each cancellation, each update from the
        payer's bank and each step Portão 3 took — with the failure, on the
        events that record one. A change of a charge's amount is not recorded.
      operationId: >-
        getRealmsByRealmIdOrganizationsByOrganizationIdPixBillingAutomaticByPixBillingAutomaticIdHistory
      parameters:
        - name: realmId
          in: path
          required: true
          description: |-
            ID of your 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: pixBillingAutomaticId
          in: path
          required: true
          description: ID of the authorization — its `_id` (24 hexadecimal characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 6729f3e1b4d3e80012c9a7c1
        - name: walletId
          in: query
          required: false
          description: >-
            Only events of these wallets (24 hexadecimal characters each). The
            authorization has one wallet, so this only narrows to it or to
            nothing.


            ---


            Example (comma-separated list):
            `?walletId=66f2a3d1b4d3e80012c9a0d2,66f2a3d1b4d3e80012c9a0e5`
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
          style: form
          explode: false
        - name: pixBillingAutomaticItemId
          in: query
          required: false
          description: >-
            Only events about these charges — their `_id` in `schedules` (24
            hexadecimal characters each). The events of sending a charge to the
            payer's bank don't record the charge, so they are left out.


            ---


            Example (comma-separated list):
            `?pixBillingAutomaticItemId=6729f3e1b4d3e80012c9a7d4,6729f3e1b4d3e80012c9a7d5`
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
          style: form
          explode: false
        - name: code
          in: query
          required: false
          description: >-
            Only events with these codes (case-insensitive) — the `code` values
            in the response. Other values match no event.


            ---


            Example (comma-separated list):
            `?code=SCHEDULE_PAID,SCHEDULE_FAILED`
          schema:
            type: array
            items:
              type: string
              maxLength: 64
          style: form
          explode: false
        - name: origin
          in: query
          required: false
          description: >-
            Only events with these origins (case-insensitive) — the `origin`
            values in the response, such as `P3`. Other values match no event.


            ---


            Example: `?origin=P3`
          schema:
            type: array
            items:
              type: string
              maxLength: 64
          style: form
          explode: false
        - name: flow
          in: query
          required: false
          description: >-
            Only events of these processes (case-insensitive) — the `flowCode`
            values in the response. Other values match no event.


            ---


            Example (comma-separated list):
            `?flow=CREATE_PIX_AUTOMATIC_SCHEDULE,UPDATE_PIX_AUTOMATIC_SCHEDULE_STATUS`
          schema:
            type: array
            items:
              type: string
              maxLength: 64
          style: form
          explode: false
        - name: eventNature
          in: query
          required: false
          description: >-
            Only events of these natures (case-insensitive): `FLOW`, `SUCCESS`
            or `ERROR`. Other values match no event.


            ---


            Example (comma-separated list): `?eventNature=SUCCESS,ERROR`
          schema:
            type: array
            items:
              type: string
              maxLength: 64
          style: form
          explode: false
        - name: startAt
          in: query
          required: false
          description: >-
            Only events recorded on or after this moment: an ISO 8601 date-time
            (`2026-12-01T03:00:00.000Z`) or date (`2026-12-01`, midnight UTC).
          schema:
            type: string
          example: '2026-12-01T03:00:00.000Z'
        - name: endAt
          in: query
          required: false
          description: Only events recorded on or before this moment, in the same format.
          schema:
            type: string
          example: '2026-12-31T02:59:59.999Z'
        - name: order
          in: query
          required: false
          description: >-
            Order of the events by when they were recorded: `DESC` (newest
            first, the default) or `ASC` (oldest first). Case-insensitive.
          schema:
            type: string
            enum:
              - ASC
              - DESC
          example: DESC
        - name: next
          in: query
          required: false
          description: >-
            Cursor returned as `next` by the previous page. Omit it for the
            first page.
          schema:
            type: string
          example: NjcyYTBiN2NiNGQzZTgwMDEyYzlhOGUz
        - name: limit
          in: query
          required: false
          description: Page size. Defaults to 15.
          schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
          example: 15
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: ID of the event.
                          example: 672a0b7cb4d3e80012c9a8e3
                        environment:
                          type: string
                          enum:
                            - LIVE
                            - TEST
                          description: >-
                            Environment of the authorization: `LIVE`
                            (production) or `TEST` (sandbox).
                          example: LIVE
                        realmId:
                          type: string
                          description: ID of the realm.
                          example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                          format: uuid
                        organizationId:
                          type: string
                          description: ID of the organization.
                          example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                          format: uuid
                        accountId:
                          type: string
                          description: ID of the organization's account.
                          example: 66f2a1c7b4d3e80012c9a0b4
                        walletId:
                          type: string
                          description: ID of the wallet of the authorization.
                          example: 66f2a3d1b4d3e80012c9a0d2
                        pixBillingAutomaticId:
                          type: string
                          description: ID of the authorization.
                          example: 6729f3e1b4d3e80012c9a7c1
                        pixBillingAutomaticItemId:
                          type: string
                          description: >-
                            ID of the charge the event is about. Absent on the
                            events about the authorization as a whole — and on
                            the events of sending a charge to the payer's bank
                            (`SCHEDULE_ATTEMPTED`, `SCHEDULE_ATTEMPT_SUCCEEDED`,
                            `SCHEDULE_ATTEMPT_FAILED`), which don't record it.
                          example: 6729f3e1b4d3e80012c9a7d4
                        code:
                          type: string
                          enum:
                            - CANCEL_PAYMENT_REQUESTED
                            - CANCEL_PAYMENT_SUCCEEDED
                            - CANCEL_PAYMENT_FAILED
                            - CANCEL_REVOKE_REQUESTED
                            - CANCEL_REVOKE_SUCCEEDED
                            - CREATE_PAYMENT_SUCCEEDED
                            - CREATE_PAYMENT_FAILED
                            - CANCEL_SCHEDULE_REQUESTED
                            - CANCEL_SCHEDULE_SUCCEEDED
                            - CANCEL_SCHEDULE_FAILED
                            - SCHEDULE_ATTEMPTED
                            - SCHEDULE_ATTEMPT_SUCCEEDED
                            - SCHEDULE_ATTEMPT_FAILED
                            - SCHEDULE_FAILED
                            - SCHEDULE_RETRY
                            - SCHEDULE_PAID
                            - SCHEDULE_CANCELED
                            - SCHEDULE_PROCESSING
                            - SCHEDULE_EXPIRED
                            - UPDATE_STATUS_PIX_AUTOMATIC_SCHEDULE_SUCCEEDED
                            - INTENT_PAYMENT_INITIATED
                            - INTENT_PAYMENT_FAILED
                            - INTENT_PAYMENT_SUCCEEDED
                            - SCHEDULE_FIRST_PAYMENT
                          description: >-
                            What happened. For the authorization:
                            `CREATE_PAYMENT_SUCCEEDED`, `CREATE_PAYMENT_FAILED`,
                            `INTENT_PAYMENT_INITIATED`,
                            `INTENT_PAYMENT_SUCCEEDED` (the payer authorized
                            it), `INTENT_PAYMENT_FAILED`,
                            `CANCEL_PAYMENT_REQUESTED`,
                            `CANCEL_PAYMENT_SUCCEEDED`, `CANCEL_PAYMENT_FAILED`,
                            `CANCEL_REVOKE_REQUESTED`,
                            `CANCEL_REVOKE_SUCCEEDED`. For a charge:
                            `SCHEDULE_ATTEMPTED`, `SCHEDULE_ATTEMPT_SUCCEEDED`,
                            `SCHEDULE_ATTEMPT_FAILED`, `SCHEDULE_FIRST_PAYMENT`,
                            `SCHEDULE_PROCESSING`, `SCHEDULE_PAID`,
                            `SCHEDULE_FAILED`, `SCHEDULE_RETRY`,
                            `SCHEDULE_CANCELED`, `SCHEDULE_EXPIRED`,
                            `CANCEL_SCHEDULE_REQUESTED`,
                            `CANCEL_SCHEDULE_SUCCEEDED`,
                            `CANCEL_SCHEDULE_FAILED` and
                            `UPDATE_STATUS_PIX_AUTOMATIC_SCHEDULE_SUCCEEDED`.
                          example: SCHEDULE_ATTEMPT_SUCCEEDED
                        description:
                          type: string
                          description: What happened, in Portuguese.
                          example: Agendamento realizado com sucesso
                        origin:
                          type: string
                          description: >-
                            Who recorded the event: `P3` when Portão 3 did — a
                            request to this API or one of its scheduled steps;
                            otherwise the internal code of the payment
                            institution that sent the update.
                          example: P3
                        flowCode:
                          type: string
                          enum:
                            - CREATE_PIX_AUTOMATIC
                            - CANCEL_PIX_AUTOMATIC
                            - CANCEL_PIX_AUTOMATIC_REVOKE
                            - CREATE_PIX_AUTOMATIC_SCHEDULE
                            - EXPIRE_PIX_AUTOMATIC_SCHEDULE
                            - CANCEL_PIX_AUTOMATIC_SCHEDULE
                            - UPDATE_PIX_AUTOMATIC_SCHEDULE_STATUS
                            - UPDATE_INTENT_PAYMENT
                          description: >-
                            The process the event belongs to:
                            `CREATE_PIX_AUTOMATIC`, `UPDATE_INTENT_PAYMENT` (the
                            payer's authorization), `CANCEL_PIX_AUTOMATIC`,
                            `CANCEL_PIX_AUTOMATIC_REVOKE`,
                            `CREATE_PIX_AUTOMATIC_SCHEDULE` (sending a charge to
                            the payer's bank),
                            `UPDATE_PIX_AUTOMATIC_SCHEDULE_STATUS`,
                            `CANCEL_PIX_AUTOMATIC_SCHEDULE` or
                            `EXPIRE_PIX_AUTOMATIC_SCHEDULE`. Absent on some
                            events.
                          example: CREATE_PIX_AUTOMATIC_SCHEDULE
                        eventNature:
                          type: string
                          enum:
                            - FLOW
                            - SUCCESS
                            - ERROR
                          description: >-
                            `FLOW` for a step of a process, `SUCCESS` for its
                            success or `ERROR` for its failure. A `FLOW` event
                            that relays an update from the payer's bank can
                            carry its failure in `error`.
                          example: SUCCESS
                        error:
                          type: object
                          properties:
                            code:
                              type: string
                              description: Code of the failure.
                              example: AUTOMATIC_PIX_PAYMENT_CANCEL_SAME_DATE
                            description:
                              type: string
                              description: Description of the failure.
                              example: >-
                                Cannot cancel a payment on or after its payment
                                date
                            message:
                              type: string
                              description: Message of the failure.
                              example: >-
                                Cannot cancel a payment on or after its payment
                                date
                          description: >-
                            The failure, on the events that record one: `ERROR`
                            events, and `FLOW` events that relay a failure from
                            the payer's bank.
                        createdAt:
                          type: string
                          description: When the event was recorded.
                          example: '2026-12-03T03:30:12.911Z'
                          format: date-time
                        updatedAt:
                          type: string
                          description: When the event's record last changed.
                          example: '2026-12-03T03:30:12.911Z'
                          format: date-time
                        __v:
                          type: number
                          description: Internal revision counter of the record.
                          example: 0
                      required:
                        - _id
                        - environment
                        - realmId
                        - organizationId
                        - accountId
                        - walletId
                        - pixBillingAutomaticId
                        - code
                        - description
                        - origin
                        - eventNature
                        - createdAt
                        - updatedAt
                      description: >-
                        One event in the life of an authorization or of one of
                        its charges.
                    description: The events of this page, in the order you asked for.
                  next:
                    type: string
                    nullable: true
                    description: >-
                      Cursor of the next page: send it as `next` to read it.
                      `null` on the last page.
                    example: NjcyYTBiN2NiNGQzZTgwMDEyYzlhOGUz
                required:
                  - items
                  - next
                description: A page of events.
        '422':
          description: >-
            `BAD_REQUEST` — A path or query parameter is invalid; `fields` lists
            each one.
          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
                    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).
                    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: order
                    message: 'Invalid option: expected one of "ASC"|"DESC"'
                    code: ORDER_ONE_OF

````

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