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

# Get payment account balance

> Get the balance of a payment account



## OpenAPI

````yaml https://api.fernhq.com/json get /payment-accounts/{paymentAccountId}/balance
openapi: 3.1.1
info:
  title: Fern Developer API
  description: >-
    Fern is a seamless currency conversion and payments API that enables
    developers to integrate onramps, offramps, and third-party fiat/crypto
    payments into their applications. 


    Fern works with licensed liquidity providers and financial institutions to
    offer global currency support in one standardized API. 
  termsOfService: https://fernhq.com/terms
  version: 1.0.0
  contact:
    name: Fern API Support
    url: https://support.fernhq.com
    email: support@fernhq.com
servers:
  - url: https://api.fernhq.com
    description: API Server
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: >-
      Use Customers API to create a customer, update their details, and get
      their details.
  - name: Payment Accounts
    description: >-
      Use Payment Accounts API to add, update and get bank accounts for an
      existing customer. Currently, only USD bank accounts with domestic
      ACH/wire routing numbers are supported.
  - name: Quotes
    description: >-
      Use Quotes API to create and fetch quotes for transactions. Currently,
      onramp and offramp transaction types are supported and will be inferred
      from the source and destination. 


      Before you can create a transaction, you must create a quote. Quotes
      enable you to specify important information about the transaction, such as
      the source and destination currencies and accounts and your developer
      fees. Quotes also provide useful information that you can use to display
      in your application, such as exchange rates and total fees. 


      - **Quotes expire after 5 minutes** 

      - You must create a quote before you create a transaction, and you will
      use the quote ID when creating a transaction. 

      - Quotes can only be created for verified customers. /n- Once you create a
      transaction with a quote, that quote can no longer be used. To generate a
      new transaction, you will have to create a new quote.
  - name: Transactions
    description: >-
      Use Transactions API to create and get transactions for a customer and a
      quote. Requires the creation of a quote beforehand per transaction.
  - name: Automation Rules
    description: >-
      Use Automation Rules API to create and manage automation rules for a
      customer.
  - name: Webhooks
    description: >-
      Use Webhooks API to manage webhook endpoints and view recent webhook
      deliveries.
paths:
  /payment-accounts/{paymentAccountId}/balance:
    get:
      tags:
        - Payment Accounts
      summary: Get payment account balance
      description: Get the balance of a payment account
      operationId: getBalance
      parameters:
        - schema:
            enum:
              - ARBITRUM
              - BASE
              - ETHEREUM
              - OPTIMISM
              - POLYGON
              - SOLANA
            title: Crypto Chain
            type: string
          example: BASE
          in: query
          name: chain
          required: true
          description: The chain the wallet is on. case-sensitive
        - schema:
            type: string
          example: USDC
          in: query
          name: currency
          required: true
          description: The currency to get the balance for
        - schema:
            format: uuid
            type: string
          example: 072a8b7b-38c7-429a-a6cf-35dae7f2fb77
          in: path
          name: paymentAccountId
          required: true
          description: Unique identifier of the payment account
      responses:
        '200':
          description: Response schema for retrieving the balance of a payment account
          content:
            application/json:
              schema:
                title: Get Balance Response Schema
                description: >-
                  Response schema for retrieving the balance of a payment
                  account
                type: object
                properties:
                  paymentAccountId:
                    format: uuid
                    type: string
                    description: Unique identifier of the payment account
                    example: 072a8b7b-38c7-429a-a6cf-35dae7f2fb77
                  currency:
                    type: object
                    properties:
                      label:
                        type: string
                        description: The label of the currency
                        example: USDC
                      chain:
                        type: string
                        description: The chain the wallet is on
                        example: base
                      contractAddress:
                        type: string
                        description: The contract address of the token on the chain
                        example: '0x1234567890abcdef1234567890abcdef12345678'
                      currencyDecimals:
                        type: number
                        description: The number of decimals for the currency
                        example: '18'
                    required:
                      - label
                      - chain
                      - currencyDecimals
                    additionalProperties: false
                  balance:
                    type: string
                    description: >-
                      The balance of the payment account in the specified
                      currency
                    example: '1000.00'
                  usdValue:
                    type: string
                    description: The USD value of the balance
                    example: '1000.00'
                required:
                  - paymentAccountId
                  - currency
                  - balance
                  - usdValue
                additionalProperties: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                description: Bad Request
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              examples:
                example1:
                  value:
                    code: BAD_REQUEST
                    message: ''
                    statusCode: 400
                example2:
                  value:
                    code: VALIDATION_ERROR
                    message: Invalid body data
                    details:
                      - path: []
                        message: ''
                        location: body
                    statusCode: 400
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Unauthorized
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: UNAUTHORIZED
                message: Missing API Key
                statusCode: 401
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                description: Forbidden
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: FORBIDDEN
                message: ''
                statusCode: 403
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                description: Not Found
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: NOT_FOUND
                message: >-
                  Customer not found with id
                  9eb88b00-f04f-409b-9df7-7dcc9003bc35
                statusCode: 404
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                description: Internal Server Error
                type: object
                properties:
                  message:
                    type: string
                    description: Human-readable error message
                    example: Invalid input provided
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: VALIDATION_ERROR
                  details:
                    description: Additional error context
                required:
                  - message
                additionalProperties: false
              example:
                code: INTERNAL_SERVER_ERROR
                message: INTERNAL_SERVER_ERROR
                statusCode: 500
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: To authenticate server-side requests

````