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

# Cancel a transfer request

> Cancels a transfer request before the money moves.

A `REQUESTED`, `PENDING_APPROVAL` or `SCHEDULED` request becomes `CANCELLED`. Its schedule is cancelled before that; its open approval request is withdrawn right after, on a best-effort basis. Cancelling a request that is already `CANCELLED` succeeds and changes nothing.

Only organization admins can cancel transfer requests.


## OpenAPI

````yaml /api-reference/banking.openapi.json post /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/transfer-requests/{transferRequestId}/cancel
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=262 copied:manual=1 unknown=35.
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 (DICT)
  - name: PIX Charges
  - name: PIX Automatic
  - name: PIX Initiation (Open Finance)
  - name: PIX Infractions (MED)
  - name: Boleto Payments
  - name: Boleto Charges
  - name: TED
  - name: Transactions
  - name: Cashback
  - name: Currency Codes
  - name: Reversals
paths:
  /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets/{walletId}/transfer-requests/{transferRequestId}/cancel:
    post:
      tags:
        - Transfers
      summary: Cancel a transfer request
      description: Cancels a transfer request before the money moves.
      operationId: >-
        postRealmsByRealmIdOrganizationsByOrganizationIdAccountsByAccountIdWalletsByWalletIdTransferRequestsByTransferRequestIdCancel
      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 wallet 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: walletId
          in: path
          required: true
          description: >-
            ID of the wallet the transfer request belongs to (24 hexadecimal
            characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 66f2a3d1b4d3e80012c9a0d2
        - name: transferRequestId
          in: path
          required: true
          description: ID of the transfer request (24 hexadecimal characters).
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          example: 6720d4f1b4d3e80012c9a2e7
        - name: x-environment
          in: header
          required: false
          description: >-
            Environment of the wallet: `LIVE` (production) or `TEST` (sandbox).
            When you omit it, the request runs in `TEST`; any other value is
            rejected.
          schema:
            type: string
            enum:
              - LIVE
              - TEST
          example: LIVE
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: ID of the transfer request.
                    example: 6720d4f1b4d3e80012c9a2e7
                  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 account both wallets belong to.
                    example: 66f2a1c7b4d3e80012c9a0b4
                  walletId:
                    type: string
                    description: >-
                      ID of the wallet that receives the money — or sends it
                      back, when `amount` is negative.
                    example: 66f2a3d1b4d3e80012c9a0d2
                  walletName:
                    type: string
                    description: >-
                      Name of that wallet when the request was created. Absent
                      when the wallet had no name.
                    example: Marketing
                  defaultWalletId:
                    type: string
                    description: >-
                      ID of the organization's main wallet when the request was
                      created: the other side of the transfer. Absent only on a
                      few requests from the first version of transfer requests,
                      which carry `originWalletId` instead.
                    example: 66f2a1d0b4d3e80012c9a0b9
                  environment:
                    type: string
                    enum:
                      - LIVE
                      - TEST
                    description: >-
                      Environment of the request: `LIVE` (production) or `TEST`
                      (sandbox).
                    example: LIVE
                  destinationCategory:
                    type: string
                    enum:
                      - FLEX_NATIONAL
                      - FLEX_INTERNATIONAL
                      - FOOD
                      - GAS
                      - MOBILITY
                      - TOLL
                      - FLEX_NATIONAL_WITHOUT_WITHDRAWALS
                      - ADS
                      - SAAS
                      - HOTEL
                      - AIRLINES
                      - TRAVEL
                      - BLOCKED
                      - CASHBACK
                    description: >-
                      Balance category of `walletId` the transfer moves: where
                      the money lands when `amount` is positive, and where it is
                      taken from when `amount` is negative. The main wallet
                      always uses `FLEX_INTERNATIONAL`.
                    example: FLEX_NATIONAL
                  amount:
                    type: number
                    description: >-
                      Amount in cents, never zero. Positive moves money from the
                      organization's main wallet into `walletId`; negative sends
                      it from `walletId` back to the main wallet.
                    example: 250000
                  txnCurrency:
                    type: string
                    description: >-
                      Currency of the amount, as an ISO 4217 numeric code: `986`
                      (Brazilian real).
                    example: '986'
                  description:
                    type: string
                    description: Description of the transfer. Absent when none was given.
                    example: Verba de eventos — novembro
                  requester:
                    type: object
                    properties:
                      userId:
                        type: string
                        description: >-
                          ID of the user who created the request. Absent only on
                          a few requests from the first version of transfer
                          requests, which carry `id` instead.
                        example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                        format: uuid
                      name:
                        type: string
                        description: >-
                          Name of the user, as it was when they created the
                          request. Absent only on a few requests from the first
                          version of transfer requests.
                        example: Mariana Costa
                      email:
                        type: string
                        description: >-
                          E-mail of the user, as it was when they created the
                          request.
                        example: mariana.costa@acme.com.br
                      id:
                        type: string
                        description: >-
                          ID of the user, on a few requests from the first
                          version of transfer requests only.
                        example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                        format: uuid
                    required:
                      - email
                    description: Who created the request.
                  status:
                    type: string
                    enum:
                      - PENDING_APPROVAL
                      - REQUESTED
                      - CONFIRMED
                      - CANCELLED
                      - EXPIRED
                      - FAILED
                      - SCHEDULED
                      - DENIED
                    description: >-
                      Status of the request:

                      - `REQUESTED` — created; it can still be edited, sent for
                      approval or confirmed.

                      - `PENDING_APPROVAL` — waiting for the approvers the
                      business policy names.

                      - `CONFIRMED` — the money moved.

                      - `SCHEDULED` — confirmed for a future day; the money
                      moves on `scheduledAt`.

                      - `CANCELLED` — cancelled before the money moved.

                      - `EXPIRED` — the approval deadline passed before it was
                      approved.

                      - `FAILED` — the transfer was refused, for the reason in
                      `failureReason`.

                      - `DENIED` — only on a few requests from the first version
                      of transfer requests.
                    example: CANCELLED
                  policyRequestId:
                    type: string
                    description: >-
                      ID of the approval request opened when the request was
                      sent for approval, or of the automatic approval that
                      confirmed it. Absent otherwise.
                    example: 4d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a
                  autoResolutionRequestedAt:
                    type: string
                    description: >-
                      When a confirmation first asked for the automatic approval
                      of the matching business policy. Absent when no
                      confirmation needed it.
                    example: '2026-11-02T13:12:05.000Z'
                    format: date-time
                  scheduledAt:
                    type: string
                    description: >-
                      Day the transfer is scheduled for. Absent when it
                      transfers as soon as it is confirmed.
                    example: '2026-11-10T00:00:00.000Z'
                    format: date-time
                  scheduledTimeZone:
                    type: string
                    description: >-
                      Time zone `scheduledAt` was read in — `America/Sao_Paulo`,
                      the only one supported. Present only with `scheduledAt`.
                    example: America/Sao_Paulo
                  scheduleId:
                    type: string
                    description: >-
                      ID of the schedule created when a request for a future day
                      was confirmed. Cancel the request to cancel it.
                    example: 8c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f
                    format: uuid
                  approvalExpiresAt:
                    type: string
                    description: >-
                      Deadline for the approval: 21:00 (São Paulo time) of the
                      day the transfer is for, and at least one hour after the
                      request was sent for approval. Present once it was sent
                      for approval.
                    example: '2026-11-03T00:00:00.000Z'
                    format: date-time
                  confirmedAt:
                    type: string
                    description: When the money moved.
                    example: '2026-11-02T13:12:07.000Z'
                    format: date-time
                  canceledAt:
                    type: string
                    description: When the request was cancelled.
                    example: '2026-11-02T15:40:00.000Z'
                    format: date-time
                  failureReason:
                    type: string
                    description: >-
                      Why the transfer failed, as an error code — for example
                      `INSUFFICIENT_FUNDS`, `ACCOUNT_BLOCKED` or
                      `BANKING_PROVIDER_UNAVAILABLE`. Only on `FAILED` requests.
                    example: INSUFFICIENT_FUNDS
                  customFields:
                    type: object
                    additionalProperties: {}
                    description: >-
                      Values of the organization's transaction custom fields,
                      keyed by each field's `slug`. Absent when the request has
                      none.


                      ---


                      Example: `{"cost-center":"CC-1020"}`
                    example:
                      cost-center: CC-1020
                  createdAt:
                    type: string
                    description: When the request was created.
                    example: '2026-11-02T13:10:22.000Z'
                    format: date-time
                  updatedAt:
                    type: string
                    description: When the request last changed.
                    example: '2026-11-02T13:10:22.000Z'
                    format: date-time
                  decision:
                    type: object
                    additionalProperties: {}
                    description: >-
                      Decision recorded on a few requests from the first version
                      of transfer requests.
                  deniedAt:
                    type: string
                    description: >-
                      When the request was denied, on a few requests from the
                      first version of transfer requests.
                    example: '2025-11-20T18:05:00.000Z'
                    format: date-time
                  originAccountId:
                    type: string
                    description: >-
                      Account the money came from, on a few requests from the
                      first version of transfer requests.
                    example: 66f2a1c7b4d3e80012c9a0b4
                  originWalletId:
                    type: string
                    description: >-
                      Wallet the money came from, on a few requests from the
                      first version of transfer requests.
                    example: 66f2a1d0b4d3e80012c9a0b9
                  sourceCategory:
                    type: string
                    enum:
                      - FLEX_NATIONAL
                      - FLEX_INTERNATIONAL
                      - FOOD
                      - GAS
                      - MOBILITY
                      - TOLL
                      - FLEX_NATIONAL_WITHOUT_WITHDRAWALS
                      - ADS
                      - SAAS
                      - HOTEL
                      - AIRLINES
                      - TRAVEL
                      - BLOCKED
                      - CASHBACK
                    description: >-
                      Balance category the money came from, on a few requests
                      from the first version of transfer requests.
                    example: FLEX_INTERNATIONAL
                required:
                  - id
                  - realmId
                  - organizationId
                  - accountId
                  - walletId
                  - environment
                  - destinationCategory
                  - amount
                  - requester
                  - status
                  - createdAt
                  - updatedAt
                description: >-
                  A transfer request: a wallet asking the organization's main
                  wallet for money — or sending money back to it — that moves
                  only once the request is confirmed, after approval when the
                  organization's business policies require it.
        '403':
          description: >-
            `TRANSFER_REQUEST_FORBIDDEN` — 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:
                      - TRANSFER_REQUEST_FORBIDDEN
                    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: TRANSFER_REQUEST_FORBIDDEN
                origin: BANKING
                message: You are not allowed to act on this transfer request
        '404':
          description: >-
            `TRANSFER_REQUEST_NOT_FOUND` — No transfer request with this ID
            exists for the wallet, account and environment.


            `TRANSACTION_SCHEDULE_NOT_FOUND` — A `SCHEDULED` request's schedule
            no longer exists, so the request wasn't cancelled.
          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:
                      - TRANSFER_REQUEST_NOT_FOUND
                      - TRANSACTION_SCHEDULE_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: TRANSFER_REQUEST_NOT_FOUND
                origin: BANKING
                message: Transfer request not found
        '409':
          description: >-
            `TRANSFER_REQUEST_NOT_CONFIRMABLE` — The request was already
            confirmed or failed, or is being confirmed at this moment.


            `TRANSFER_REQUEST_EXPIRED` — The approval deadline passed; the
            request is now `EXPIRED`.


            `SCHEDULE_NOT_CANCELABLE` — The scheduled transfer is already
            running, or already ran.


            `MOVE_BALANCE_IN_PROGRESS` — The policy's top-up of the wallet is
            still running. 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:
                      - TRANSFER_REQUEST_NOT_CONFIRMABLE
                      - TRANSFER_REQUEST_EXPIRED
                      - SCHEDULE_NOT_CANCELABLE
                      - MOVE_BALANCE_IN_PROGRESS
                    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: TRANSFER_REQUEST_NOT_CONFIRMABLE
                origin: BANKING
                message: Transfer request is not in a confirmable state
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter is not a valid ID; `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: organizationId
                    message: Invalid UUID
                    code: ORGANIZATIONID_UUID

````

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