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

# Create a wallet

> Creates a wallet in the organization's account.

The wallet starts `PENDING`, with no bank account details yet, and becomes `ACTIVE` once provisioned — usually within seconds; only then can it hold balances and move money. It is shared with the users in `shared`, or, when you omit it, with you alone as `OWNER`; users who aren't members of the organization are left out. A `PERSONAL` wallet can't be created while its first `OWNER` already has an `ACTIVE`, `PENDING` or `BLOCKED` one in the account. Send `x-environment: LIVE` to create a production wallet.

The account must be open in the environment, and its wallet limit, when it has one, counts every wallet it ever had — closed ones included. Only organization admins can create wallets.


## OpenAPI

````yaml /api-reference/banking.openapi.json post /realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/wallets
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:
    post:
      tags:
        - Wallets
      summary: Create a wallet
      description: Creates a wallet in the organization's account.
      operationId: >-
        postRealmsByRealmIdOrganizationsByOrganizationIdAccountsByAccountIdWallets
      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 is created in.

            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 to create the wallet in: `LIVE` (production) or `TEST`
            (sandbox). When you omit it, the wallet is created in `TEST`; any
            other value is rejected.
          schema:
            type: string
            enum:
              - LIVE
              - TEST
          example: LIVE
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                currency:
                  type: string
                  enum:
                    - '986'
                  description: >-
                    Currency of the wallet, as an ISO 4217 numeric code: `986`
                    (Brazilian real) is the only one accepted.
                  example: '986'
                name:
                  type: string
                  minLength: 1
                  description: Name of the wallet.
                  example: Marketing
                type:
                  default: SHARED
                  description: >-
                    Kind of wallet: `SHARED` (used by a team, the default),
                    `PERSONAL` (a single user's) or `VEHICLE` (a vehicle's).
                  example: SHARED
                  type: string
                  enum:
                    - PERSONAL
                    - SHARED
                    - VEHICLE
                settings:
                  description: >-
                    Settings of the wallet. When you omit them, every payment
                    method is enabled.
                  type: object
                  properties:
                    payment:
                      description: >-
                        Which payment methods the wallet can use. Each one you
                        leave out is enabled.
                      type: object
                      properties:
                        pix:
                          default: true
                          description: >-
                            Whether PIX payments can be sent from the wallet.
                            The organization's main wallet ignores it.
                          example: true
                          type: boolean
                        bankSlip:
                          default: true
                          description: >-
                            Whether boletos can be paid from the wallet. The
                            organization's main wallet ignores it.
                          example: true
                          type: boolean
                        card:
                          default: true
                          description: >-
                            Whether new cards can be issued for the wallet.
                            Cards it already has keep working.
                          example: true
                          type: boolean
                customFields:
                  description: >-
                    Values of the organization's wallet custom fields, keyed by
                    each field's `slug`. Each value must fit its field's type
                    and options.


                    ---


                    Example: `{"cost-center":"CC-1020"}`
                  example:
                    cost-center: CC-1020
                  type: object
                  additionalProperties: {}
                shared:
                  description: >-
                    Users who can use the wallet, and how. At least one must be
                    an `OWNER` who is a member of the organization; users who
                    aren't members are left out. When you omit it, you become
                    the wallet's only `OWNER`.
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 1
                        description: ID of a user of the organization.
                        example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                      role:
                        type: string
                        description: >-
                          What the user can do with the wallet: `OWNER` and
                          `USER` both use it and can edit it — its users
                          included; `READ_ONLY` only sees it. At least one
                          `OWNER` is required.
                        example: OWNER
                    required:
                      - id
                      - role
              required:
                - currency
                - name
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  _id:
                    type: string
                    description: ID of the wallet.
                    example: 66f2a3d1b4d3e80012c9a0d2
                  realmId:
                    type: string
                    description: ID of the realm the wallet belongs to.
                    example: f495ff0c-ab54-4f99-8e92-ca8682e4de9b
                    format: uuid
                  organizationId:
                    type: string
                    description: ID of the organization the wallet belongs to.
                    example: c4bd3f21-dfbd-44e8-8055-68ba15bed410
                    format: uuid
                  accountId:
                    type: string
                    description: ID of the account the wallet belongs to.
                    example: 66f2a1c7b4d3e80012c9a0b4
                  environment:
                    type: string
                    enum:
                      - LIVE
                      - TEST
                    description: >-
                      Environment the wallet lives in: `LIVE` (production) or
                      `TEST` (sandbox).
                    example: LIVE
                  external:
                    type: object
                    properties:
                      balanceAccountGroupId:
                        type: string
                        description: >-
                          Internal identifier of the wallet at the bank. Absent
                          while the wallet is being created.
                        example: 4f6b0e1d-2b3a-4c5d-8e9f-0a1b2c3d4e5f
                      accountNumber:
                        type: number
                        nullable: true
                        description: >-
                          Number of the wallet's bank account. Absent, or
                          `null`, while the wallet is being created.
                        example: 10023456
                      branch:
                        type: string
                        description: Branch of the wallet's bank account.
                        example: '0001'
                      accountType:
                        type: string
                        nullable: true
                        enum:
                          - PREPAID
                          - CCLG
                          - null
                        description: >-
                          Type of the wallet's bank account: `PREPAID` (a
                          prepaid payment account) or `CCLG` (a postpaid
                          account).
                        example: PREPAID
                    description: >-
                      The wallet's bank account. Absent on a few wallets created
                      before it was recorded.
                  currency:
                    type: string
                    description: >-
                      Currency of the wallet, as an ISO 4217 numeric code.
                      Always `986` (Brazilian real).
                    example: '986'
                  customFields:
                    type: object
                    additionalProperties: {}
                    description: >-
                      Values of the organization's wallet custom fields, keyed
                      by each field's `slug`. Absent when the wallet has none.


                      ---


                      Example: `{"cost-center":"CC-1020"}`
                    example:
                      cost-center: CC-1020
                  status:
                    type: string
                    enum:
                      - PENDING
                      - ACTIVE
                      - CANCELLING
                      - CANCELLED
                      - BLOCKED
                      - REPROVED
                      - FRAUD_ANALYSIS
                      - FRAUD_CONFIRMED
                    description: >-
                      Status of the wallet: `PENDING` (being created — it can't
                      move money yet), `ACTIVE`, `BLOCKED` (it can't move money
                      until it is unblocked), `CANCELLING` or `CANCELLED`
                      (closed), `REPROVED` (its creation was refused),
                      `FRAUD_ANALYSIS` (on hold while suspected fraud is
                      analyzed) or `FRAUD_CONFIRMED` (closed for fraud).
                    example: PENDING
                  role:
                    type: string
                    description: >-
                      Role of the wallet in the account: `DEFAULT` for the
                      organization's main wallet — the one that funds and
                      receives the other wallets' transfers — and `CHECKING` for
                      every other wallet. A few older wallets carry another
                      value.
                    example: CHECKING
                  type:
                    type: string
                    enum:
                      - PERSONAL
                      - SHARED
                      - ORGANIZATION
                      - VEHICLE
                    description: >-
                      Kind of wallet: `ORGANIZATION` (the organization's main
                      wallet), `SHARED` (used by a team), `PERSONAL` (a single
                      user's) or `VEHICLE` (a vehicle's, for its fuel and other
                      purchases).
                    example: SHARED
                  name:
                    type: string
                    nullable: true
                    description: >-
                      Name of the wallet. Absent on older wallets created
                      without one.
                    example: Marketing
                  shared:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: Internal identifier of this entry.
                          example: 66f2a3d1b4d3e80012c9a0d3
                        id:
                          type: string
                          description: ID of the user.
                          example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                          format: uuid
                        firstName:
                          type: string
                          description: >-
                            First name of the user, as it was when they were
                            given access.
                          example: Mariana
                        lastName:
                          type: string
                          description: >-
                            Last name of the user, as it was when they were
                            given access.
                          example: Costa
                        email:
                          type: string
                          description: >-
                            E-mail of the user, as it was when they were given
                            access.
                          example: mariana.costa@acme.com.br
                        role:
                          type: string
                          enum:
                            - OWNER
                            - USER
                            - READ_ONLY
                          description: >-
                            What the user can do with the wallet: `OWNER` and
                            `USER` both use it and can edit it — its users
                            included; `READ_ONLY` only sees it. Creating or
                            editing a wallet's users requires at least one
                            `OWNER`.
                          example: OWNER
                      required:
                        - id
                        - role
                      description: A user who can use the wallet.
                    description: >-
                      Users who can use the wallet, and how. Organization admins
                      can use every wallet.
                  settings:
                    type: object
                    properties:
                      payment:
                        type: object
                        properties:
                          pix:
                            type: boolean
                            description: >-
                              Whether PIX payments can be sent from the wallet.
                              The organization's main wallet ignores it.
                            example: true
                          bankSlip:
                            type: boolean
                            description: >-
                              Whether boletos can be paid from the wallet. The
                              organization's main wallet ignores it.
                            example: true
                          card:
                            type: boolean
                            description: >-
                              Whether new cards can be issued for the wallet.
                              Cards it already has keep working.
                            example: true
                        description: Which payment methods the wallet can use.
                      notification:
                        type: object
                        properties:
                          balanceLimit:
                            type: object
                            properties:
                              amount:
                                type: number
                                description: Balance below which the alert fires, in cents.
                                example: 50000
                              email:
                                type: boolean
                                description: Whether the alert is also sent by e-mail.
                                example: true
                              isActive:
                                type: boolean
                                description: Whether the alert is on.
                                example: true
                            required:
                              - amount
                              - email
                              - isActive
                            description: The wallet's low-balance alert.
                        required:
                          - balanceLimit
                        description: >-
                          Notification settings. Only some older wallets have
                          them.
                    description: >-
                      Settings of the wallet. Absent on older wallets created
                      without them.
                  walletProduct:
                    type: string
                    description: >-
                      Card product of the wallet, inherited from the account.
                      Absent on older wallets.
                    example: NORMAL
                  isSuper:
                    type: boolean
                    description: >-
                      Whether the wallet's cards are on the premium card
                      product.
                    example: false
                  createdBy:
                    type: string
                    nullable: true
                    description: >-
                      ID of the user who created the wallet. Absent, or `null`,
                      on older wallets.
                    example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                    format: uuid
                  updatedBy:
                    type: string
                    nullable: true
                    description: >-
                      ID of the user who created the wallet; editing it doesn't
                      change this field. Absent, or `null`, on older wallets.
                    example: e3553bc1-5e20-4e17-b22a-a796fda0aa99
                    format: uuid
                  accountType:
                    type: string
                    enum:
                      - PREPAID
                      - CCLG
                    description: >-
                      Type of the wallet's bank account, on older wallets only:
                      the same as `external.accountType`.
                    example: PREPAID
                  createdAt:
                    type: string
                    description: When the wallet was created.
                    example: '2024-10-01T12:30:05.000Z'
                    format: date-time
                  updatedAt:
                    type: string
                    description: When the wallet last changed.
                    example: '2024-10-01T12:34:41.000Z'
                    format: date-time
                  __v:
                    type: number
                    description: Internal revision counter of the wallet.
                    example: 0
                required:
                  - _id
                  - realmId
                  - organizationId
                  - accountId
                  - environment
                  - currency
                  - status
                  - role
                  - type
                  - shared
                  - isSuper
                  - createdAt
                  - updatedAt
                description: >-
                  A wallet: a balance of the organization's account, with its
                  own bank account details, cards and PIX keys, shared with the
                  users who can use it.
        '400':
          description: >-
            `ACCOUNT_NOT_OPEN` — The account isn't open in this environment.


            `ACCOUNT_LIMITS_EXCEEDED` — The account already has as many wallets
            as its limits allow.
          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_OPEN
                      - ACCOUNT_LIMITS_EXCEEDED
                    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_OPEN
                origin: BANKING
                message: Account not open
        '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.


            `WALLET_OWNER_NOT_FOUND` — No user in `shared` with the `OWNER` role
            is a member 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:
                      - ACCOUNT_NOT_FOUND
                      - WALLET_OWNER_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
        '409':
          description: >-
            `WALLET_CONFLICT` — A `PERSONAL` wallet was requested and its first
            `OWNER` already has an `ACTIVE`, `PENDING` or `BLOCKED` 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:
                      - WALLET_CONFLICT
                    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: WALLET_CONFLICT
                origin: BANKING
                message: Wallet already exists
        '422':
          description: >-
            `BAD_REQUEST` — A path parameter is not a valid ID or the body
            failed validation; `fields` lists each offending field.


            `INVALID_CUSTOM_FIELD` — A `customFields` key is not the `slug` of
            an active wallet custom field of the organization, or its value
            doesn't fit the field; `fields` names 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:
                      - BAD_REQUEST
                      - INVALID_CUSTOM_FIELD
                    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: currency
                    message: 'Invalid option: expected one of "986"'
                    code: CURRENCY_ONE_OF
                    values:
                      - '986'

````

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