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

# List banks

> The banks a payment can reach in a country, for a bank picker. Pass `q` to narrow by name or code.

`bankId` is opaque: send it back whole when adding a destination and never parse it. `code` is there so people recognise their bank.

An empty `banks` array is a real answer: in the UK, for example, payments route on sort codes and there is no bank to choose.

This response is cacheable for an hour.

Requires the `recipients:read` scope.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/banks
openapi: 3.1.0
info:
  title: Talescria API
  version: 1.0.0
  description: >-
    Accounts, recipients, payments, transfers between your accounts, payment
    links, customers and invoices. Authenticate with an access token from your
    OAuth client.
servers:
  - url: https://api.talescria.com
    description: Production (test and live keys)
security:
  - bearerAuth: []
tags:
  - name: Accounts
    description: Your accounts and their balances.
  - name: Recipients
    description: People and businesses you pay, and where to pay them.
  - name: Payments
    description: Paying recipients, including across currencies.
  - name: Transfers
    description: Moving money between your own accounts.
  - name: Payment links
    description: Links anyone can open to pay you by card.
  - name: Customers
    description: People and businesses who pay you.
  - name: Invoices
    description: One-off invoices and recurring series.
paths:
  /v1/banks:
    get:
      tags:
        - Recipients
      summary: List banks
      description: >-
        The banks a payment can reach in a country, for a bank picker. Pass `q`
        to narrow by name or code.


        `bankId` is opaque: send it back whole when adding a destination and
        never parse it. `code` is there so people recognise their bank.


        An empty `banks` array is a real answer: in the UK, for example,
        payments route on sort codes and there is no bank to choose.


        This response is cacheable for an hour.


        Requires the `recipients:read` scope.
      operationId: listBanks
      parameters:
        - name: country
          in: query
          required: true
          description: >-
            ISO 3166-1 alpha-2. Directory data exists for NG, GH, KE, TZ, UG,
            ZA, CA, CN, HK.
          schema:
            type: string
            minLength: 2
            maxLength: 2
        - name: q
          in: query
          description: Narrows by bank name or code, case-insensitively.
          schema:
            type: string
      responses:
        '200':
          description: The directory, possibly empty.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDirectory'
              examples:
                nigeria:
                  summary: Narrowed with `?country=NG&q=guaranty`
                  value:
                    country: NG
                    banks:
                      - bankId: bk:NG:058
                        name: Guaranty Trust Bank
                        code: '058'
                        bic: GTBINGLA
                uk:
                  summary: A country whose rail needs no bank
                  value:
                    country: GB
                    banks: []
        '400':
          description: '`VALIDATION`: A field is missing or malformed. `message` says which.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            `UNAUTHENTICATED`: The access token is missing, expired or revoked.
            Get a new token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `INSUFFICIENT_SCOPE`: Your API key lacks the scope this operation
            needs. The scope is named in `message` and the `WWW-Authenticate`
            header.


            `ENVIRONMENT_MISMATCH`: The request named a different environment
            from the key's.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: '`RATE_LIMITED`: Too many requests. Wait for `Retry-After` seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: >-
            `UPSTREAM_ERROR`: A service we depend on answered unexpectedly.
            Retry, and contact support with the `x-request-id` if it persists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: '`UPSTREAM_UNAVAILABLE`: Temporarily unavailable. Retry with backoff.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    BankDirectory:
      type: object
      required:
        - country
        - banks
      properties:
        country:
          type: string
          example: NG
        banks:
          type: array
          description: >-
            Empty when the country's rail routes on something else, sort codes,
            IBANs, which is a real answer and not an error.
          items:
            $ref: '#/components/schemas/Bank'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Branch on this, not on `message`. See Errors.
            message:
              type: string
              description: For people. Wording can change.
    Bank:
      type: object
      required:
        - bankId
        - name
        - code
      properties:
        bankId:
          type: string
          description: >-
            **Opaque. Pass it back whole when creating a destination; never
            parse it.** It encodes the provider that listed the bank, which is
            what lets another provider be added without this shape changing.
          example: bk:NG:058
        name:
          type: string
          example: Guaranty Trust Bank
        code:
          type: string
          description: >-
            The provider's routing code, **for display only**, show it beside
            the name so a person recognises their bank. Send `bankId` back, not
            this.
          example: '058'
        bic:
          type: string
          description: >-
            SWIFT/BIC where the bank has one. The only identifier meaningful
            across providers.
          example: GTBINGLA
        institutionNumber:
          type: string
          description: >-
            Where a country routes on this instead of a bank code (Canada, for
            one).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An access token (`at_test_…` or `at_live_…`) from `POST
        https://idp.talescria.com/oauth/token`.

````

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