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

# Create payment account

> Create an account for a customer



## OpenAPI

````yaml https://api.fernhq.com/json post /payment-accounts
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:
    post:
      tags:
        - Payment Accounts
      summary: Create payment account
      description: Create an account for a customer
      operationId: createPaymentAccount
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentAccountRequestSchema'
      responses:
        '201':
          description: Create Payment Account Response
          content:
            application/json:
              schema:
                title: Create Payment Account Response Schema
                description: Response schema for creating a payment account
                type: object
                properties:
                  paymentAccountId:
                    format: uuid
                    type: string
                    description: The id of the payment account
                    examples:
                      - 03b7030f-6da1-4d76-9352-cdebd82112c8
                  paymentAccountType:
                    enum:
                      - FERN_CRYPTO_WALLET
                      - EXTERNAL_CRYPTO_WALLET
                      - EXTERNAL_BANK_ACCOUNT
                      - FERN_AUTO_FIAT_ACCOUNT
                      - FERN_FIAT_ACCOUNT
                    type: string
                    description: Type of payment account to create
                    examples:
                      - EXTERNAL_BANK_ACCOUNT
                  nickname:
                    type: string
                    description: Nickname for customer to use for the payment account
                    examples:
                      - Savings Account
                  createdAt:
                    format: date-time
                    type: string
                    description: ISO timestamp when this transaction was created
                  customerId:
                    format: uuid
                    type: string
                    description: The id of the customer this payment account belongs to
                    examples:
                      - 03b7030f-6da1-4d76-9352-cdebd82112c8
                  paymentAccountStatus:
                    enum:
                      - PENDING
                      - ACTIVE
                      - DEACTIVATED
                    type: string
                    description: The status of the payment account
                    examples:
                      - ACTIVE
                      - PENDING
                      - DEACTIVATED
                  externalBankAccount:
                    $ref: '#/components/schemas/ExternalBankAccountResponseSchema'
                  fernAutoFiatAccount:
                    $ref: '#/components/schemas/FernAutoFiatAccountResponseSchema'
                  fernFiatAccount:
                    $ref: '#/components/schemas/FernFiatAccountResponseSchema'
                  externalCryptoWallet:
                    $ref: '#/components/schemas/ExternalCryptoWalletResponseSchema'
                  fernCryptoWallet:
                    $ref: '#/components/schemas/FernCryptoWalletResponseSchema'
                  isThirdParty:
                    default: false
                    type: boolean
                    description: >-
                      Whether the payment account is a third-party account.
                      Defaults to false.
                    examples:
                      - false
                  bankAccountFormLink:
                    type: string
                    description: A link to a hosted form to create a bank account
                    examples:
                      - https://forms.fernhq.com/bank_account/abc
                required:
                  - paymentAccountId
                  - paymentAccountType
                  - paymentAccountStatus
              examples:
                externalBankNoForm:
                  summary: External Bank Account
                  value:
                    paymentAccountId: 11111111-2222-3333-4444-555555555555
                    paymentAccountType: EXTERNAL_BANK_ACCOUNT
                    nickname: Operating Account
                    createdAt: '2025-10-30T12:00:00Z'
                    customerId: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                    paymentAccountStatus: ACTIVE
                    externalBankAccount:
                      bankAccountType: CHECKING
                      bankAccountOwnerName: Acme Corp
                      bankAccountOwnerEmail: finance@acme.com
                      bankName: Chase Bank
                      bankAccountCurrency:
                        label: USD
                      bankAccountMask: '***6789'
                      bankAccountPaymentMethod: ACH
                    isThirdParty: false
                externalBankWithForm:
                  summary: External Bank Account (With Form Link)
                  value:
                    paymentAccountId: ''
                    paymentAccountType: EXTERNAL_BANK_ACCOUNT
                    nickname: Operating Account
                    customerId: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                    paymentAccountStatus: PENDING
                    isThirdParty: false
                    bankAccountFormLink: >-
                      https://forms.fernhq.com/payment-account/11111111-80fa-465f-8b95-040a6c6b7470
                fernAutoFiatAccount:
                  summary: Fern Auto Fiat Account
                  value:
                    paymentAccountId: 33333333-4444-5555-6666-777777777777
                    paymentAccountType: FERN_AUTO_FIAT_ACCOUNT
                    nickname: Auto Float
                    createdAt: '2025-10-30T12:02:00Z'
                    customerId: 99999999-aaaa-bbbb-cccc-dddddddddddd
                    paymentAccountStatus: ACTIVE
                    fernAutoFiatAccount:
                      currency:
                        label: USD
                      supportedDestinationCurrencies:
                        - label: USDC
                    isThirdParty: false
                externalCryptoWallet:
                  summary: External Crypto Wallet
                  value:
                    paymentAccountId: 44444444-5555-6666-7777-888888888888
                    paymentAccountType: EXTERNAL_CRYPTO_WALLET
                    nickname: Treasury Wallet
                    createdAt: '2025-10-30T12:03:00Z'
                    customerId: bbbbbbbb-cccc-dddd-eeee-ffffffffffff
                    paymentAccountStatus: ACTIVE
                    externalCryptoWallet:
                      currency:
                        label: USDC
                        chain: ETHEREUM
                        contractAddress: '0x123456789abcd123456789abcd123456789abcd'
                        currencyDecimals: 18
                      address:
                        address: '0x5C1F15c77F0cC123456789abcd123456789aBcDe'
                        chain: ETHEREUM
                    isThirdParty: false
                fernCryptoWallet:
                  summary: Fern Crypto Wallet
                  value:
                    paymentAccountId: 55555555-6666-7777-8888-999999999999
                    paymentAccountType: FERN_CRYPTO_WALLET
                    nickname: Managed Wallet
                    createdAt: '2025-10-30T12:04:00Z'
                    customerId: 12121212-3434-5656-7878-909090909090
                    paymentAccountStatus: ACTIVE
                    fernCryptoWallet:
                      cryptoWalletType: EVM
                      address:
                        address: '0x9A1F15c77F0cC123456789abcd123456789aBcDe'
                        chain: ETHEREUM
                    isThirdParty: 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:
  schemas:
    CreatePaymentAccountRequestSchema:
      title: Create Payment Account Request Schema
      description: Schema for creating a new payment account
      type: object
      properties:
        paymentAccountType:
          enum:
            - FERN_CRYPTO_WALLET
            - EXTERNAL_CRYPTO_WALLET
            - EXTERNAL_BANK_ACCOUNT
            - FERN_AUTO_FIAT_ACCOUNT
            - FERN_FIAT_ACCOUNT
          type: string
          description: Type of payment account to create
          example: EXTERNAL_BANK_ACCOUNT
        customerId:
          format: uuid
          type: string
          description: Customer to create payment account
          example: 072a8b7b-38c7-429a-a6cf-35dae7f2fb77
        nickname:
          type: string
          description: Nickname for customer to use for the payment account
          example: Savings Account
        organizationId:
          format: uuid
          type: string
          description: Organization to create payment account
          example: 24ab9fdd-5042-4d96-a616-4bef2877dd01
        externalBankAccount:
          $ref: '#/components/schemas/ExternalBankAccountRequestSchema'
        fernAutoFiatAccount:
          $ref: '#/components/schemas/FernAutoFiatAccountRequestSchema'
        externalCryptoWallet:
          $ref: '#/components/schemas/ExternalCryptoWalletResponseSchema'
        fernCryptoWallet:
          $ref: '#/components/schemas/FernCryptoWalletRequestSchema'
        isThirdParty:
          default: false
          type: boolean
          description: >-
            Whether the payment account is a third-party account. Defaults to
            false.
          example: false
      required:
        - paymentAccountType
        - customerId
      additionalProperties: false
    ExternalBankAccountResponseSchema:
      title: External Bank Account Response Schema
      description: Response schema for external bank accounts
      type: object
      properties:
        bankAccountType:
          enum:
            - CHECKING
            - SAVINGS
          type: string
          description: The type of bank account
          example: CHECKING
        bankAccountOwnerName:
          minLength: 1
          type: string
          description: The name of the owner of this bank account
          example: John Doe
        bankAccountOwnerEmail:
          format: email
          type: string
          description: The emil of the owner of this bank account
          example: john@exmaple.com
        bankName:
          minLength: 1
          type: string
          description: The bank name
          example: Chase Bank
        bankAccountCurrency:
          type: object
          properties:
            label:
              type: string
          required:
            - label
          additionalProperties: false
          description: The currency supported by the bank account
        bankAccountMask:
          type: string
          description: The mask of this bank accounts account number
          example: '***6789'
        bankAccountPaymentMethod:
          enum:
            - ACH
            - WIRE
            - SEPA
            - AE_UAEFTS
            - AR_TRANSFERS_3
            - AU_BECS
            - BD_BEFTN
            - BO_RTGS
            - BR_TED_DOC_PIX
            - CA_INTERAC
            - CL_TEF
            - CN_CNAPS
            - CO_ACH
            - CR_SINPE
            - CZ_CERTIS
            - DK_NEMKONTO_FI
            - DO_ACH
            - EC_LOCAL
            - EG_RTGS_IPN
            - GB_BACS_CHAPS_FPS
            - GH_GHIPSS
            - GT_ACH
            - HK_HKICL_CHATS_ECG
            - HU_GIRO
            - ID_SKN_RTGS
            - IL_ZAHAV
            - IN_NEFT_RTGS_IMPS
            - JM_LOCAL
            - JO_ACH
            - JP_ZENGIN
            - KE_KIBBS_PESALINK
            - KR_LOCAL
            - LK_LOCAL
            - MX_SPEI
            - MY_IBG_RENTAS
            - NG_NIBSS_NEFT
            - NO_NICS
            - NP_LOCAL
            - NZ_LOCAL
            - PE_CCE
            - PH_INSTAPAY_PESONET
            - PK_RAAST_IBFT
            - PL_ELIXIR_BLUE_CASH
            - QA_QPS
            - RO_RTGS
            - SA_MADA
            - SE_BANKGIROT
            - SG_FAST_MEPS
            - SV_LOCAL
            - SWIFT
            - TH_BAHTNET_PROMPTPAY
            - TR_FAST_EFT
            - TZ_RTGS
            - VN_IBPS
            - ZA_RTGS_EFT
          type: string
          description: The payment method bank account works with
          example: ACH
        bankAccountNumber:
          type: string
          description: The bank account's account number
          example: '12346789'
        routingNumber:
          type: string
          description: The bank account's routing number if applicable
          example: '11110000'
        wireRoutingNumber:
          type: string
          description: The bank account's wire routing number (US only)
          example: '026009593'
        iban:
          type: string
          description: International Bank Account Number
          example: GB29NWBK60161331926819
        bicSwift:
          type: string
          description: SWIFT/BIC code for international transfers
          example: SMCOGB2LXXX
        sortCode:
          type: string
          description: Sort code (used in the UK)
          example: '123456'
        transitNumber:
          type: string
          description: Transit number (used in Canada)
          example: '12345'
        institutionNumber:
          type: string
          description: Institution number (used in Canada)
          example: '111'
        bsbNumber:
          type: string
          description: BSB number (used in Australia)
          example: 123-456
        ifscCode:
          type: string
          description: IFSC code (used in India)
          example: IFSC0001234
        clabeNumber:
          type: string
          description: CLABE number (used in Mexico)
          example: '123456789012345678'
        bankCode:
          type: string
          description: Bank code (country-specific)
          example: '123456'
        branchCode:
          type: string
          description: Branch code (country-specific)
          example: '12345'
        cnapsCode:
          type: string
          description: CNAPS code (used in China)
          example: '123456789'
        nubanNumber:
          type: string
          description: NUBAN number (used in Nigeria)
          example: '123456789012'
        pixCode:
          type: string
          description: PIX key (used in Brazil)
          example: '123456789'
        clearingCode:
          type: string
          description: Clearing code (used in Hong Kong)
          example: '123456'
        taxNumber:
          type: string
          description: Tax identification number (CPF/CNPJ)
          example: '123456789'
        phoneNumber:
          type: string
          description: >-
            Phone number associated with the bank account or used as an alias
            for transfers
          example: '+15555555555'
      required:
        - bankAccountType
        - bankAccountOwnerName
        - bankAccountOwnerEmail
        - bankName
        - bankAccountCurrency
        - bankAccountMask
        - bankAccountPaymentMethod
    FernAutoFiatAccountResponseSchema:
      description: Response schema for Fern auto fiat accounts
      title: Fern Auto Fiat Account Response Schema
      type: object
      properties:
        bankAccountOwnerName:
          minLength: 1
          type: string
          description: The name of the owner of this bank account
          example: John Doe
        bankName:
          minLength: 1
          type: string
          description: The bank name
          example: Chase Bank
        bankAccountCurrency:
          type: object
          properties:
            label:
              type: string
          required:
            - label
          additionalProperties: false
          description: The currency supported by the bank account
        bankAccountPaymentMethods:
          type: array
          items:
            enum:
              - ACH
              - WIRE
              - SEPA
              - AE_UAEFTS
              - AR_TRANSFERS_3
              - AU_BECS
              - BD_BEFTN
              - BO_RTGS
              - BR_TED_DOC_PIX
              - CA_INTERAC
              - CL_TEF
              - CN_CNAPS
              - CO_ACH
              - CR_SINPE
              - CZ_CERTIS
              - DK_NEMKONTO_FI
              - DO_ACH
              - EC_LOCAL
              - EG_RTGS_IPN
              - GB_BACS_CHAPS_FPS
              - GH_GHIPSS
              - GT_ACH
              - HK_HKICL_CHATS_ECG
              - HU_GIRO
              - ID_SKN_RTGS
              - IL_ZAHAV
              - IN_NEFT_RTGS_IMPS
              - JM_LOCAL
              - JO_ACH
              - JP_ZENGIN
              - KE_KIBBS_PESALINK
              - KR_LOCAL
              - LK_LOCAL
              - MX_SPEI
              - MY_IBG_RENTAS
              - NG_NIBSS_NEFT
              - NO_NICS
              - NP_LOCAL
              - NZ_LOCAL
              - PE_CCE
              - PH_INSTAPAY_PESONET
              - PK_RAAST_IBFT
              - PL_ELIXIR_BLUE_CASH
              - QA_QPS
              - RO_RTGS
              - SA_MADA
              - SE_BANKGIROT
              - SG_FAST_MEPS
              - SV_LOCAL
              - SWIFT
              - TH_BAHTNET_PROMPTPAY
              - TR_FAST_EFT
              - TZ_RTGS
              - VN_IBPS
              - ZA_RTGS_EFT
            type: string
          description: The payment methods bank account works with
          example:
            - ACH
            - WIRE
        bankAccountNumber:
          type: string
          description: The bank account's account number
          example: '12346789'
        routingNumber:
          type: string
          description: The bank account's routing number if applicable
          example: '12346789'
        iban:
          type: string
          description: International Bank Account Number
          example: GB29NWBK60161331926819
        bicSwift:
          type: string
          description: SWIFT/BIC code for international transfers
          example: SMCOGB2LXXX
        destinationPaymentAccountId:
          type: string
          description: The payment account id funds will be forwarded to
          example: 03b7030f-6da1-4d76-9352-cdebd82112c8
        destinationCurrency:
          $ref: '#/components/schemas/CurrencySchema'
        destinationPaymentMethod:
          enum:
            - ARBITRUM
            - BASE
            - ETHEREUM
            - OPTIMISM
            - POLYGON
            - SOLANA
          title: Destination Payment Method Schema
          description: The payment method for the destination account
          type: string
          example: BASE
      required:
        - bankAccountOwnerName
        - bankName
        - bankAccountCurrency
        - bankAccountPaymentMethods
        - destinationPaymentAccountId
        - destinationCurrency
    FernFiatAccountResponseSchema:
      description: Response schema for Fern fiat accounts
      title: Fern Fiat Account Response Schema
      type: object
      properties:
        bankAccountOwnerName:
          minLength: 1
          type: string
          description: The name of the owner of this bank account
          example: John Doe
        bankName:
          minLength: 1
          type: string
          description: The bank name
          example: Chase Bank
        bankAccountCurrency:
          type: object
          properties:
            label:
              type: string
          required:
            - label
          additionalProperties: false
          description: The currency supported by the bank account
        bankAccountPaymentMethods:
          type: array
          items:
            enum:
              - ACH
              - WIRE
              - SEPA
              - AE_UAEFTS
              - AR_TRANSFERS_3
              - AU_BECS
              - BD_BEFTN
              - BO_RTGS
              - BR_TED_DOC_PIX
              - CA_INTERAC
              - CL_TEF
              - CN_CNAPS
              - CO_ACH
              - CR_SINPE
              - CZ_CERTIS
              - DK_NEMKONTO_FI
              - DO_ACH
              - EC_LOCAL
              - EG_RTGS_IPN
              - GB_BACS_CHAPS_FPS
              - GH_GHIPSS
              - GT_ACH
              - HK_HKICL_CHATS_ECG
              - HU_GIRO
              - ID_SKN_RTGS
              - IL_ZAHAV
              - IN_NEFT_RTGS_IMPS
              - JM_LOCAL
              - JO_ACH
              - JP_ZENGIN
              - KE_KIBBS_PESALINK
              - KR_LOCAL
              - LK_LOCAL
              - MX_SPEI
              - MY_IBG_RENTAS
              - NG_NIBSS_NEFT
              - NO_NICS
              - NP_LOCAL
              - NZ_LOCAL
              - PE_CCE
              - PH_INSTAPAY_PESONET
              - PK_RAAST_IBFT
              - PL_ELIXIR_BLUE_CASH
              - QA_QPS
              - RO_RTGS
              - SA_MADA
              - SE_BANKGIROT
              - SG_FAST_MEPS
              - SV_LOCAL
              - SWIFT
              - TH_BAHTNET_PROMPTPAY
              - TR_FAST_EFT
              - TZ_RTGS
              - VN_IBPS
              - ZA_RTGS_EFT
            type: string
          description: The payment methods bank account works with
          example:
            - ACH
            - WIRE
        bankAccountNumber:
          type: string
          description: The bank account's account number
          example: '12346789'
        routingNumber:
          type: string
          description: The bank account's routing number if applicable
          example: '12346789'
        iban:
          type: string
          description: International Bank Account Number
          example: GB29NWBK60161331926819
        bicSwift:
          type: string
          description: SWIFT/BIC code for international transfers
          example: SMCOGB2LXXX
        sortCode:
          type: string
          description: Sort code (used in the UK)
          example: '123456'
        transitNumber:
          type: string
          description: Transit number (used in Canada)
          example: '12345'
        institutionNumber:
          type: string
          description: Institution number (used in Canada)
          example: '111'
        bsbNumber:
          type: string
          description: BSB number (used in Australia)
          example: 123-456
        clabeNumber:
          type: string
          description: CLABE number (used in Mexico)
          example: '123456789012345678'
        bankCode:
          type: string
          description: Bank code (country-specific)
          example: '123456'
        cnapsCode:
          type: string
          description: CNAPS code (used in China)
          example: '123456789'
        clearingCode:
          type: string
          description: Clearing code (used in Hong Kong)
          example: '123456'
    ExternalCryptoWalletResponseSchema:
      description: Response schema for external crypto wallets
      title: External Crypto Wallet Response Schema
      type: object
      properties:
        cryptoWalletType:
          enum:
            - EVM
            - SVM
          type: string
          description: The type of crypto wallet
          example: EVM
        chain:
          enum:
            - ARBITRUM
            - BASE
            - ETHEREUM
            - OPTIMISM
            - POLYGON
            - SOLANA
          title: Crypto Chain
          description: The chain the wallet is on
          type: string
          example: BASE
        address:
          description: The address of the crypto wallet
          type: string
          example: '0x1234567890123456789012345678901234567890'
      required:
        - cryptoWalletType
        - chain
        - address
    FernCryptoWalletResponseSchema:
      description: Response schema for Fern crypto wallets
      title: Fern Crypto Wallet Response Schema
      type: object
      properties:
        cryptoWalletType:
          enum:
            - EVM
            - SVM
          type: string
          description: The type of crypto wallet
          example: EVM
        address:
          description: The address of the crypto wallet
          type: string
          example: '0x1234567890123456789012345678901234567890'
      required:
        - cryptoWalletType
    ExternalBankAccountRequestSchema:
      title: External Bank Account Request Schema
      description: Request schema for external bank accounts
      type: object
      properties:
        accountNumber:
          type: string
          description: The bank account number
          example: '00123456789'
        bankName:
          type: string
          description: The bank name
          example: Chase Bank
        bankAccountCurrency:
          type: string
          description: The currency supported by the bank account
          example: USD
        bankAddress:
          $ref: '#/components/schemas/GeneralAddressSchema'
        bankAccountType:
          enum:
            - CHECKING
            - SAVINGS
          type: string
          description: The type of bank account
          example: CHECKING
        bankAccountPaymentMethod:
          type: string
          description: >-
            The payment method bank account will work with and be validated
            against
          enum:
            - ACH
            - WIRE
            - SEPA
            - AE_UAEFTS
            - AR_TRANSFERS_3
            - AU_BECS
            - BD_BEFTN
            - BO_RTGS
            - BR_TED_DOC_PIX
            - CA_INTERAC
            - CL_TEF
            - CN_CNAPS
            - CO_ACH
            - CR_SINPE
            - CZ_CERTIS
            - DK_NEMKONTO_FI
            - DO_ACH
            - EC_LOCAL
            - EG_RTGS_IPN
            - GB_BACS_CHAPS_FPS
            - GH_GHIPSS
            - GT_ACH
            - HK_HKICL_CHATS_ECG
            - HU_GIRO
            - ID_SKN_RTGS
            - IL_ZAHAV
            - IN_NEFT_RTGS_IMPS
            - JM_LOCAL
            - JO_ACH
            - JP_ZENGIN
            - KE_KIBBS_PESALINK
            - KR_LOCAL
            - LK_LOCAL
            - MX_SPEI
            - MY_IBG_RENTAS
            - NG_NIBSS_NEFT
            - NO_NICS
            - NP_LOCAL
            - NZ_LOCAL
            - PE_CCE
            - PH_INSTAPAY_PESONET
            - PK_RAAST_IBFT
            - PL_ELIXIR_BLUE_CASH
            - QA_QPS
            - RO_RTGS
            - SA_MADA
            - SE_BANKGIROT
            - SG_FAST_MEPS
            - SV_LOCAL
            - SWIFT
            - TH_BAHTNET_PROMPTPAY
            - TR_FAST_EFT
            - TZ_RTGS
            - VN_IBPS
            - ZA_RTGS_EFT
          example: ACH
        bankAccountOwner:
          type: object
          properties:
            email:
              format: email
              type: string
              description: Email of the beneficiary
              example: john@example.com
            firstName:
              minLength: 1
              type: string
              description: First name of the beneficiary if it is a individual account
              example: John
            lastName:
              minLength: 1
              type: string
              description: Last name of the beneficiary if it is a individual account
              example: Doe
            businessName:
              minLength: 1
              type: string
              description: Full name of the business if it is a business bank account
              example: Fern LLC
            address:
              $ref: '#/components/schemas/GeneralAddressSchema'
            type:
              enum:
                - INDIVIDUAL
                - BUSINESS
              type: string
              title: Beneficiary Type Enum
              description: Type of beneficiary - individual or business entity
              example: INDIVIDUAL
          required:
            - email
            - address
            - type
          additionalProperties: false
          title: Bank Account Owner Schema
          description: Details about the bank account owner/beneficiary
        routingNumber:
          type: string
          description: Routing number (used in the US)
          example: '11110000'
        sortCode:
          type: string
          description: Sort code (used in the UK)
          example: '123456'
        iban:
          type: string
          description: International Bank Account Number
          example: GB29NWBK60161331926819
        bicSwift:
          type: string
          description: SWIFT/BIC code for international transfers
          example: SMCOGB2LXXX
        transitNumber:
          type: string
          description: Transit number (used in Canada)
          example: '12345'
        institutionNumber:
          type: string
          description: institution number (used in Canada)
          example: '111'
        bsbNumber:
          type: string
          description: BSB number (used in Australia)
          example: 123-456
        ifscCode:
          type: string
          description: IFSC code (used in India)
          example: IFSC0001234
        clabeNumber:
          type: string
          description: CLABE number (used in Mexico)
          example: '123456789012345678'
        bankCode:
          type: string
          description: Bank code (country-specific)
          example: '123456'
        branchCode:
          type: string
          description: Branch code (country-specific)
          example: '12345'
        cnapsCode:
          type: string
          description: CNAPS code (used in China)
          example: '123456789'
        nubanNumber:
          type: string
          description: NUBAN number (used in Nigeria)
          example: '123456789012'
        pixCode:
          type: string
          description: PIX key (used in Brazil)
          example: '123456789'
        clearingCode:
          type: string
          description: Clearing code (used in Hong Kong)
          example: '123456'
        taxNumber:
          type: string
          description: Tax identification number (CPF/CNPJ)
          example: '123456789'
        phoneNumber:
          type: string
          description: Phone number of the mobile wallet
          example: '+5511999998888'
      required:
        - bankName
        - bankAccountCurrency
        - bankAddress
        - bankAccountType
        - bankAccountPaymentMethod
        - bankAccountOwner
    FernAutoFiatAccountRequestSchema:
      title: Fern Auto Fiat Account Request Schema
      description: Request schema for Fern auto fiat accounts
      type: object
      properties:
        bankAccountCurrency:
          type: string
          description: The currency supported by the bank account
          example: USD
        destinationPaymentAccountId:
          type: string
          description: The payment account id funds will be forwarded to
          example: 03b7030f-6da1-4d76-9352-cdebd82112c8
        destinationCurrency:
          type: string
          description: >-
            The currency that funds will be forwarded to in destination payment
            account
          example: USDC
        destinationPaymentMethod:
          enum:
            - ARBITRUM
            - BASE
            - ETHEREUM
            - OPTIMISM
            - POLYGON
            - SOLANA
          title: Crypto Chain
          type: string
          description: >-
            The payment method used to deposit funds to the destination payment
            account
          example: BASE
        developerFeePercent:
          type: string
          description: >-
            The percentage developer fee to be taken from transactions into this
            account. If not specified then the fern fee will be set
          example: '0.1'
      required:
        - bankAccountCurrency
        - destinationPaymentAccountId
        - destinationCurrency
    FernCryptoWalletRequestSchema:
      description: Request schema for Fern crypto wallets
      title: Fern Crypto Wallet Request Schema
      type: object
      properties:
        cryptoWalletType:
          enum:
            - EVM
            - SVM
          type: string
          description: The type of crypto wallet
          example: EVM
      required:
        - cryptoWalletType
    CurrencySchema:
      title: Currency Schema
      description: Schema representing either a fiat or crypto currency
      anyOf:
        - type: object
          properties:
            label:
              type: string
            chain:
              enum:
                - ARBITRUM
                - BASE
                - ETHEREUM
                - OPTIMISM
                - POLYGON
                - SOLANA
              title: Crypto Chain
              description: The chain the crypto currency is on
              type: string
            contractAddress:
              type: string
            currencyDecimals:
              type: number
          required:
            - label
        - type: object
          properties:
            label:
              type: string
          required:
            - label
      example:
        label: USDC
        chain: ETHEREUM
        contractAddress: '0x123456789abcd123456789abcd123456789abcd'
        currencyDecimals: 18
    GeneralAddressSchema:
      type: object
      properties:
        country:
          enum:
            - AD
            - AE
            - AF
            - AG
            - AI
            - AL
            - AM
            - AO
            - AQ
            - AR
            - AS
            - AT
            - AU
            - AZ
            - BA
            - BB
            - BD
            - BE
            - BF
            - BG
            - BH
            - BI
            - BJ
            - BM
            - BN
            - BO
            - BQ
            - BR
            - BS
            - BT
            - BW
            - BY
            - BZ
            - CA
            - CD
            - CF
            - CG
            - CH
            - CI
            - CK
            - CL
            - CM
            - CN
            - CO
            - CR
            - CU
            - CV
            - CY
            - CZ
            - DE
            - DJ
            - DK
            - DM
            - DO
            - DZ
            - EC
            - EE
            - EG
            - ER
            - ES
            - ET
            - FI
            - FJ
            - FK
            - FM
            - FO
            - FR
            - GA
            - GB
            - GD
            - GE
            - GF
            - GG
            - GH
            - GI
            - GL
            - GM
            - GN
            - GP
            - GQ
            - GR
            - GS
            - GT
            - GU
            - GW
            - GY
            - HK
            - HN
            - HR
            - HT
            - HU
            - ID
            - IE
            - IL
            - IM
            - IN
            - IO
            - IQ
            - IR
            - IS
            - IT
            - JE
            - JM
            - JO
            - JP
            - KE
            - KG
            - KH
            - KI
            - KM
            - KN
            - KP
            - KR
            - KW
            - KY
            - KZ
            - LA
            - LB
            - LC
            - LI
            - LK
            - LR
            - LS
            - LT
            - LU
            - LV
            - LY
            - MA
            - MC
            - MD
            - ME
            - MG
            - MH
            - MK
            - ML
            - MM
            - MN
            - MO
            - MP
            - MQ
            - MR
            - MS
            - MT
            - MU
            - MV
            - MW
            - MX
            - MY
            - MZ
            - NA
            - NE
            - NG
            - NI
            - NL
            - 'NO'
            - NP
            - NR
            - NU
            - NZ
            - OM
            - PA
            - PE
            - PG
            - PH
            - PK
            - PL
            - PM
            - PN
            - PR
            - PS
            - PT
            - PW
            - PY
            - QA
            - RE
            - RO
            - RS
            - RU
            - RW
            - SA
            - SB
            - SC
            - SD
            - SS
            - SE
            - SG
            - SH
            - SI
            - SK
            - SL
            - SM
            - SN
            - SO
            - SR
            - ST
            - SV
            - SY
            - SZ
            - TC
            - TD
            - TF
            - TG
            - TH
            - TJ
            - TK
            - TL
            - TM
            - TN
            - TO
            - TR
            - TT
            - TV
            - TW
            - TZ
            - UA
            - UG
            - UM
            - US
            - UY
            - UZ
            - VA
            - VC
            - VE
            - VG
            - VI
            - VN
            - VU
            - WF
            - WS
            - YE
            - YT
            - ZA
            - ZM
            - ZW
          type: string
          description: Two-letter country code (e.g., US for United States)
          example: US
        addressLine1:
          minLength: 4
          maxLength: 35
          type: string
          description: Street address including house/building number
          example: 350 5th Avenue
        addressLine2:
          minLength: 4
          maxLength: 35
          type: string
          description: Additional address information (apartment, suite, unit, etc.)
          example: Floor 21
        city:
          minLength: 1
          type: string
          description: Name of the city or town
          example: New York
        state:
          type: string
          description: State or province name (e.g., New York)
          example: New York
        stateCode:
          nullable: true
          type: string
          description: State or province abbreviation (e.g., NY for New York)
          example: NY
        postalCode:
          type: string
          description: Postal/ZIP code
          example: '10016'
        locale:
          default: en-US
          type: string
          description: Language and region format (defaults to US English)
          example: en-US
      required:
        - country
        - addressLine1
        - city
        - state
        - locale
      additionalProperties: false
      title: General Address Schema
      description: Physical address information
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: To authenticate server-side requests

````