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

# Get an account's transaction totals

> Totals the money in and money out of every wallet of the account in a period: the sum of the `CREDIT` transactions (`input`) and of the `DEBIT` transactions (`output`), in cents.

`startDate` and `endDate` are required. Narrow the totals with the same filters as the account's transactions list — `financialImpactType`, `transactionTypes`, `cardId` and `internalTransaction` — to match a filtered list. Send `x-environment: LIVE` for production transactions.

Only organization admins can read the whole account's totals.


## OpenAPI

````yaml /api-reference/banking.openapi.json get /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/transactions-summary
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}/transactions-summary:
    get:
      tags:
        - Transactions
      summary: Get an account's transaction totals
      description: >-
        Totals the money in and money out of every wallet of the account in a
        period: the sum of the `CREDIT` transactions (`input`) and of the
        `DEBIT` transactions (`output`), in cents.
      operationId: >-
        getRealmsByRealmIdOrganizationsByOrganizationIdAccountsByAccountIdTransactionsSummary
      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 the account belongs to.

            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: x-environment
          in: header
          required: false
          description: >-
            Environment of the transactions: `LIVE` (production) or `TEST`
            (sandbox). When you omit it, you get the totals of the `TEST`
            transactions; any other value is rejected.
          schema:
            type: string
            enum:
              - LIVE
              - TEST
          example: LIVE
        - name: startDate
          in: query
          required: true
          description: >-
            Start of the period, inclusive, compared with each transaction's
            `effectiveAt`: an ISO 8601 date-time (`2026-11-01T03:00:00.000Z`) or
            date (`2026-11-01`, read as midnight UTC).
          schema:
            type: string
          example: '2026-11-01T03:00:00.000Z'
        - name: endDate
          in: query
          required: true
          description: >-
            End of the period, inclusive, in the same format as `startDate`. A
            date alone (`2026-11-30`) is midnight UTC at the start of that day,
            so the rest of the day is left out.
          schema:
            type: string
          example: '2026-12-01T02:59:59.999Z'
        - name: financialImpactType
          in: query
          required: false
          description: >-
            Only transactions with these effects on the balance
            (case-insensitive, comma-separated for several): `DEBIT`, `CREDIT`
            or `NONE`. `NONE` transactions move no money, so they add nothing to
            the totals.


            ---


            Example (comma-separated list): `?financialImpactType=DEBIT,CREDIT`
          schema:
            type: array
            items:
              type: string
              enum:
                - DEBIT
                - CREDIT
                - NONE
          style: form
          explode: false
        - name: transactionTypes
          in: query
          required: false
          description: >-
            Only transactions of these kinds (case-insensitive, comma-separated
            for several): `CARD`, `PIX`, `BOLETO`, `FEE` or `P2P` (transfers
            between wallets at Portão 3). TED transfers have no kind here: they
            count only when you send no `transactionTypes`.


            ---


            Example (comma-separated list): `?transactionTypes=CARD,PIX`
          schema:
            type: array
            items:
              type: string
              enum:
                - CARD
                - PIX
                - BOLETO
                - FEE
                - P2P
          style: form
          explode: false
        - name: cardId
          in: query
          required: false
          description: >-
            Only the transactions of these cards (24 hexadecimal characters
            each, comma-separated for several).


            ---


            Example (comma-separated list):
            `?cardId=66f2a4b8b4d3e80012c9a0e1,66f2a4b8b4d3e80012c9a0e2`
          schema:
            type: array
            items:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
          style: form
          explode: false
        - name: internalTransaction
          in: query
          required: false
          description: >-
            `true` for only the transfers between wallets at Portão 3 (`P2P`) —
            ignored when `transactionTypes` includes `P2P`, which then decides
            alone. `false`, like omitting it, applies no filter.
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
          example: 'false'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  input:
                    type: number
                    description: >-
                      Sum of the `CREDIT` transactions (money in), in cents
                      (BRL).
                    example: 1520000
                  output:
                    type: number
                    description: >-
                      Sum of the `DEBIT` transactions (money out), in cents
                      (BRL).
                    example: 984320
                required:
                  - input
                  - output
                description: Totals of the transactions in a period.
        '403':
          description: '`FORBIDDEN_WALLET` — You are not an admin of the organization.'
          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:
                      - FORBIDDEN_WALLET
                    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: FORBIDDEN_WALLET
                origin: BANKING
                message: >-
                  You do not have permission to perform this action on this
                  wallet
        '404':
          description: >-
            `ACCOUNT_NOT_FOUND` — No account with this ID exists in the
            organization.
          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
                    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
        '422':
          description: >-
            `BAD_REQUEST` — A path or query parameter is invalid or missing;
            `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: startDate
                    message: 'Invalid input: expected string, received undefined'
                    code: STARTDATE_REQUIRED
        '503':
          description: >-
            `QUERY_TIMEOUT` — The period holds too many transactions to total in
            time. Narrow it.
          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:
                      - QUERY_TIMEOUT
                    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: QUERY_TIMEOUT
                origin: BANKING
                message: >-
                  The period holds too many transactions to total in time.
                  Narrow it.

````

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