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

# Step 2 Add bank account (passkey or wallet)

> Add a bank account to withdraw to. At least one bank account must be added before any off-ramp withdrawal can be initated.
The bank account details must be the ones sent to `get-add-bank-account-payload`, on the same chain, along with
the authorization it enabled: the stamped `bodyToSign` for a Turnkey account (`signedBody` + `webAuthnStamp`), or the
wallet signature of the `typedData` for a self-custodial account (`walletSignature` + `issuedAt`).



## OpenAPI

````yaml /api-reference/openapi-integrator.json post /v1/submit/add-bank-account
openapi: 3.0.3
info:
  title: Byzantine Integrator API
  description: Byzantine REST API for integrators.
  license:
    name: ''
  version: 0.2.0
servers:
  - url: https://api.byzantine.fi
    description: Prod deployment
security: []
tags:
  - name: API health
    description: Check API status.
  - name: Customer management
    description: Endpoints to create, update, and retrieve customer information.
  - name: Account management
    description: Endpoints to manage accounts, bank accounts, invitations, and user roles.
  - name: Products
    description: Endpoints to get data about products and vaults.
  - name: Transactions
    description: Endpoints to create and manage transactions.
  - name: OTP authentication
    description: Endpoints to initialize and manage user authentication with OTP.
  - name: Events
    description: Endpoints to list lifecycle events.
  - name: Webhooks
    description: Integrator-managed outbound webhook subscriptions and delivery history.
  - name: Integrator key management
    description: >-
      Endpoints to inspect the current integrator credential scope, create,
      update and delete integrator keys.
paths:
  /v1/submit/add-bank-account:
    post:
      tags:
        - Account management
      summary: Step 2 Add bank account (passkey or wallet)
      description: >-
        Add a bank account to withdraw to. At least one bank account must be
        added before any off-ramp withdrawal can be initated.

        The bank account details must be the ones sent to
        `get-add-bank-account-payload`, on the same chain, along with

        the authorization it enabled: the stamped `bodyToSign` for a Turnkey
        account (`signedBody` + `webAuthnStamp`), or the

        wallet signature of the `typedData` for a self-custodial account
        (`walletSignature` + `issuedAt`).
      operationId: add_bank_account
      parameters:
        - name: X-Pubkey
          in: header
          description: >-
            Integrator's ECDSA public key (P-256 curve, compressed SEC1 format).
            Example:
            0x038fedef7c12f93bbf342ad8943b7a825a3b41f61c9dc118b2c718efebabbf62fd
          required: true
          schema:
            type: string
        - name: X-Timestamp
          in: header
          description: >-
            Unix timestamp in seconds (UTC). Must be within tolerance window (1
            minute) to prevent replay attacks. Example: 1760375826
          required: true
          schema:
            type: string
        - name: X-Signature
          in: header
          description: >-
            ECDSA signature (DER-encoded, hex with 0x prefix). Signs the
            message: `{timestamp}{METHOD}{path_and_query}{json_body}`. Example:
            0x3045022100...
          required: true
          schema:
            type: string
        - name: chain_id
          in: query
          description: >-
            Chain ID the payload was requested for (1 for Ethereum, 8453 for
            Base). Defaults to 1
          required: false
          schema:
            type: integer
            format: int32
            nullable: true
            minimum: 0
      requestBody:
        description: >-
          Bank account details to associate with the Byzantine account, and the
          signature authorizing it
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddBankAccountRequestBody'
        required: true
      responses:
        '201':
          description: Bank account added successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddBankAccountResponse'
        '400':
          description: >-
            Invalid request payload, invalid chain ID, or authorization kind not
            matching the account
        '401':
          description: Unauthorized - Account does not belong to integrator
        '403':
          description: >-
            Forbidden - Signature is not the issued intent, not from the account
            wallet, or expired
        '500':
          description: Internal server error
      security:
        - integrator_auth: []
components:
  schemas:
    AddBankAccountRequestBody:
      allOf:
        - $ref: '#/components/schemas/AddBankAccountRequest'
        - $ref: '#/components/schemas/BankAccountAuthorization'
        - type: object
    AddBankAccountResponse:
      allOf:
        - $ref: '#/components/schemas/LiquidationAddress'
        - type: object
    AddBankAccountRequest:
      type: object
      required:
        - accountId
        - currency
        - label
      properties:
        accountId:
          $ref: '#/components/schemas/Uuid'
        currency:
          $ref: '#/components/schemas/Currency'
        label:
          type: string
        achBankAccountDetails:
          allOf:
            - $ref: '#/components/schemas/AchAccountPayload'
          nullable: true
        ibanBankAccountDetails:
          allOf:
            - $ref: '#/components/schemas/IbanAccountPayload'
          nullable: true
    BankAccountAuthorization:
      oneOf:
        - type: object
          description: 'Turnkey account: the stamped `bodyToSign`'
          required:
            - signedBody
            - webAuthnStamp
          properties:
            signedBody:
              $ref: '#/components/schemas/SignRawPayloadRequest'
            webAuthnStamp:
              type: string
              description: >-
                Cryptographically passkey signed (stamped). For more info, see
                [authentication
                methods](https://docs.byzantine.fi/api-reference/authentication-methods).
        - type: object
          description: 'Self-custodial account: the wallet signature of the typed data'
          required:
            - walletSignature
            - issuedAt
          properties:
            walletSignature:
              type: string
              description: >-
                The `eth_signTypedData_v4` signature, by the account wallet, of
                the `typedData` returned by

                `get-add-bank-account-payload`. Hex-encoded; an ERC-1271
                signature is accepted for a smart wallet.
              example: 0x1b2c…
            issuedAt:
              type: integer
              format: int64
              description: >-
                The `issuedAt` returned by `get-add-bank-account-payload` (unix
                seconds).
              example: 1700000000
              minimum: 0
      description: How the account owner authorized the bank account addition
    LiquidationAddress:
      type: object
      required:
        - bankAccountId
        - accountId
        - label
        - liquidationAddress
        - createdAt
        - destinationCurrency
        - destinationRail
      properties:
        bankAccountId:
          $ref: '#/components/schemas/Uuid'
        accountId:
          $ref: '#/components/schemas/Uuid'
        label:
          type: string
          description: The label the customer gave this bank account at `add-bank-account`.
          example: Business account
        liquidationAddress:
          type: string
        createdAt:
          type: string
          format: date-time
        destinationCurrency:
          $ref: '#/components/schemas/Currency'
        destinationRail:
          $ref: '#/components/schemas/PaymentRail'
        bankName:
          type: string
          description: >-
            Name of the bank holding the account, as declared at
            `add-bank-account` (`null` when the IBAN

            payload did not declare it, or for bank accounts added before it was
            recorded).
          example: BNP Paribas
          nullable: true
        last4:
          type: string
          description: >-
            Last four characters of the account number (IBAN or ACH) declared at
            `add-bank-account`

            (`null` for bank accounts added before it was recorded). The full
            number is never stored.
          example: '1234'
          nullable: true
    Uuid:
      type: string
      format: uuid
      description: A UUID string
      example: 550e8400-e29b-41d4-a716-446655440000
    Currency:
      type: string
      enum:
        - usd
        - eur
        - usdc
        - eurc
    AchAccountPayload:
      type: object
      required:
        - bankName
        - accountNumber
        - routingNumber
        - checkingOrSavings
      properties:
        bankName:
          type: string
        accountNumber:
          type: string
        routingNumber:
          type: string
        checkingOrSavings:
          $ref: '#/components/schemas/CheckingOrSavings'
    IbanAccountPayload:
      type: object
      required:
        - accountNumber
        - bic
        - country
      properties:
        bankName:
          type: string
          nullable: true
        accountNumber:
          type: string
        bic:
          type: string
        country:
          type: string
    SignRawPayloadRequest:
      type: object
      description: >-
        The object that needs to be signed by the end user to make a
        transaction.
      required:
        - type
        - timestampMs
        - organizationId
        - parameters
      properties:
        type:
          type: string
          description: Defaults to `ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2`
          example: ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2
        timestampMs:
          type: string
          description: UNIX timestamp of the creation of the transaction.
        organizationId:
          type: string
          description: The account ID making the transaction.
        parameters:
          $ref: '#/components/schemas/SignRawPayloadParams'
    PaymentRail:
      type: string
      enum:
        - ach
        - sepa
        - ethereum
        - base
    CheckingOrSavings:
      type: string
      enum:
        - checking
        - savings
        - unknown
    SignRawPayloadParams:
      type: object
      description: >-
        The parameters object containing the specific intent data for this
        transaction.
      required:
        - signWith
        - payload
        - encoding
        - hashFunction
      properties:
        signWith:
          type: string
          description: >-
            A Wallet account address, Private Key address, or Private Key
            identifier.
        payload:
          type: string
          description: Raw unsigned payload to be signed.
        encoding:
          type: string
          description: >-
            How the payload is encoded: `PAYLOAD_ENCODING_HEXADECIMAL` or
            `PAYLOAD_ENCODING_EIP7702_AUTHORIZATION`
          example: PAYLOAD_ENCODING_HEXADECIMAL
        hashFunction:
          type: string
          description: >-
            Rather Turnkey should hash the message or not: `HASH_FUNCTION_NO_OP`
            or `HASH_FUNCTION_KECCAK256`
          example: HASH_FUNCTION_NO_OP
  securitySchemes:
    integrator_auth:
      type: apiKey
      in: header
      name: X-Pubkey, X-Timestamp, X-Signature

````

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