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

# Prepare a wallet-ownership proof

> Get the exact message a self-custody customer must sign to prove they control the destination wallet.

**Requires scope:** `manage:accounts` — see [Required scopes](/getting-started/authentication#required-scopes-finance-api).

Returns the message a self-custody customer must sign to prove they control the destination wallet of a virtual bank account.

Nothing is persisted — there is no preparation id and no expiry, so two calls for the same account and wallet return an equivalent message.

<Warning>The customer must sign `message` **verbatim and blind**. It embeds an opaque provider token, so do not reformat, re-encode, pretty-print, or reconstruct it — the signature is checked against the exact bytes, and a mismatch fails with `signature-mismatch`.</Warning>

Submit the message and signature in the `ownershipProof` block of [Create a virtual bank account](/api-reference/Finance-API/virtual-bank-accounts/create-a-virtual-bank-account).

Not every account needs this step. Call it to find out: if a proof is required you get the message to sign, and if it isn't you get `400 ownership-proof-not-applicable` and can create the account directly.

Only an externally-owned account can sign — the scheme is EIP-191, and ERC-1271 contract signatures are not supported.

## Errors

The codes this endpoint can return, in addition to the [standard errors](/guides/finance/errors#standard-errors). Branch on `code`, never the message.

| HTTP  | `code`                           | When                                                                      |
| ----- | -------------------------------- | ------------------------------------------------------------------------- |
| `400` | `validation-error`               | `walletAddress` or `blockchain` is missing                                |
| `400` | `invalid-request`                | unsupported `blockchain`                                                  |
| `400` | `ownership-proof-not-applicable` | this account does not require a customer-signed wallet-ownership proof    |
| `400` | `account-holder-unresolved`      | the account does not resolve to exactly one active account-holder party   |
| `404` | `account-not-found`              | no such account for your company                                          |
| `404` | `wallet-not-found`               | `walletAddress` is not this account's self-custody wallet on `blockchain` |


## OpenAPI

````yaml api-reference/Finance-API-Specs.yaml POST /accounts/{accountId}/virtual-bank-accounts/prepare
openapi: 3.1.0
info:
  title: Venly Finance API
  description: >
    REST API for the Venly Finance platform:

    - Party management (Individuals & Organisations)

    - Identity verification — hosted KYC/KYB links and Sumsub share-token
    forwarding

    - Account management with party association

    - Wallet balances & token allowances on supported chains

    - Virtual bank accounts for global pay-in (EUR SEPA, USD ACH/WIRE/RTP/SWIFT)

    - Fiat-to-crypto payment sessions (pay-in)

    - Bank pay-outs — beneficiary allow-listing, routes, and PULL/PUSH pay-outs

    - Account-to-account fiat & crypto transfers

    - EIP-2612 permits and allowances

    - Webhook registration for asynchronous event delivery


    ## Authentication


    All endpoints use OAuth2 client credentials. Obtain a token first, then
    include it in every request:


    **Step 1 — Get a token:**

    ```bash

    curl -X POST
    https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
    \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=client_credentials&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}"
    ```


    **Step 2 — Use the token:**

    ```

    Authorization: Bearer {access_token}

    ```


    Tokens expire after **5 minutes**. Implement refresh logic in your client.
  version: 1.5.0
  contact:
    name: Venly Support
    email: support@venly.io
    url: https://docs.venlyfinance.com
  license:
    name: Proprietary
  x-logo:
    url: https://venlyfinance.com/logo.png
  x-security-contact: security@venly.io
servers:
  - url: https://api.venlyfinance.com/v1
    description: Production
  - url: https://api-staging.venlyfinance.com/v1
    description: Staging
security:
  - OAuth2: []
tags:
  - name: Parties
    description: Party management (Individuals & Organisations)
  - name: Accounts
    description: Account management, party-role associations
  - name: Wallets
    description: Blockchain wallet balances
  - name: Virtual Bank Accounts
    description: Virtual bank account payment references for global payments
  - name: Fiat-to-crypto Payment Sessions
    description: Fiat-to-crypto payment session creation
  - name: Payout Bank Accounts
    description: Allow-listing beneficiary bank accounts as pay-out destinations
  - name: Payout Routes
    description: >-
      Account-scoped routes pairing a beneficiary bank account with a crypto
      deposit asset
  - name: Payouts
    description: Crypto-to-fiat pay-outs over a registered route
  - name: Transfers
    description: Fiat and crypto transfer operations between accounts
  - name: Permits
    description: EIP-712 permit signature management for token approvals
  - name: Supported Assets
    description: >-
      Discover which chains and assets your tenant can settle in, and whether an
      account can use them yet.
  - name: Allowances
    description: Token allowance management for wallets
  - name: Webhooks
    description: Webhook registration and delivery testing
paths:
  /accounts/{accountId}/virtual-bank-accounts/prepare:
    post:
      tags:
        - Virtual Bank Accounts
      summary: Prepare a wallet-ownership proof
      description: >
        **Requires scope:** `manage:accounts`


        Returns the exact message a self-custody customer must sign to prove
        they control the

        destination wallet of a virtual bank account.


        This step is stateless: nothing is persisted, there is no preparation id
        and no expiry, so two

        calls for the same account and wallet return an equivalent message. The
        customer signs the

        `message` **verbatim and blind** with the destination wallet's own key —
        it embeds an opaque

        provider token, so do not reformat, re-encode, or reconstruct it.


        Submit the message plus signature in the `ownershipProof` block of

        [Create a virtual bank
        account](/api-reference/Finance-API/virtual-bank-accounts/create-a-virtual-bank-account).


        Not every account needs this step — call it to find out. Where no proof
        is required the

        call answers `400 ownership-proof-not-applicable` and the account can be
        created directly.


        Only an externally-owned account can sign: the scheme is EIP-191, and
        ERC-1271 contract

        signatures are not supported.
      operationId: prepareVirtualBankAccountOwnershipProof
      parameters:
        - $ref: '#/components/parameters/AccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareOwnershipProofRequest'
            example:
              walletAddress: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
              blockchain: ETHEREUM
      responses:
        '200':
          description: The assembled message to sign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SinglePrepareOwnershipProofResponse'
              example:
                success: true
                result:
                  walletAddress: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
                  blockchain: ETHEREUM
                  message: >-
                    I confirm ownership of
                    0x71C7656EC7ab88b098defB751B7401B5f6d8976F on 2026-07-09
                    [tok:9f2c41ab...]
                  signedOnUtc: '2026-07-09'
        '400':
          description: >
            Invalid request. Possible error codes:

            - `validation-error` — `walletAddress` or `blockchain` is missing

            - `invalid-request` — unsupported `blockchain`

            - `ownership-proof-not-applicable` — this account does not require a
            customer-signed wallet-ownership proof

            - `account-holder-unresolved` — the account does not resolve to
            exactly one active account-holder party
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: >
            Not found. Possible error codes:

            - `account-not-found` — no such account for your company

            - `wallet-not-found` — `walletAddress` is not this account's
            self-custody wallet on `blockchain`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: >-
            `recipient-verification-pending` — the account holder's verification
            is still pending. **Retryable** once approved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            `recipient-verification-rejected` — the account holder's
            verification was rejected or revoked; provisioning cannot proceed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server error, including `identity-verification-rejected`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            `identity-verification-unavailable` — verification is temporarily
            unavailable. Retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    AccountId:
      name: accountId
      in: path
      required: true
      description: Unique account identifier
      schema:
        type: string
        format: uuid
      example: b2a1f0e9-8c7d-4e3a-9f21-0a1b2c3d4e5f
  schemas:
    PrepareOwnershipProofRequest:
      type: object
      description: >-
        Request to assemble the wallet-ownership-proof message for a virtual
        bank account.
      required:
        - walletAddress
        - blockchain
      properties:
        walletAddress:
          type: string
          maxLength: 128
          description: The destination self-custody wallet address to prove ownership of
        blockchain:
          type: string
          maxLength: 32
          description: The chain of the destination wallet (e.g. ETHEREUM)
    SinglePrepareOwnershipProofResponse:
      allOf:
        - $ref: '#/components/schemas/BaseResponse'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/PrepareOwnershipProofResponse'
    ErrorResponse:
      type: object
      description: Error response wrapper
      properties:
        success:
          type: boolean
          description: Always false for error responses
          example: false
        errors:
          type: array
          description: List of errors that occurred
          items:
            $ref: '#/components/schemas/ErrorBody'
        result:
          type: object
          nullable: true
          description: Null or omitted when success is false
    BaseResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the request was successful
    PrepareOwnershipProofResponse:
      type: object
      description: >
        The fully-assembled message to sign verbatim. No preparation id, no
        expiry and no provider

        identifier are returned — the embedded provider customer token stays
        opaque inside `message`.
      properties:
        walletAddress:
          type: string
        blockchain:
          type: string
        message:
          type: string
          description: >-
            The message the client signs verbatim and blind with the destination
            wallet
        signedOnUtc:
          type: string
          description: The UTC date (ISO-8601) embedded in the message
          example: '2026-07-09'
    ErrorBody:
      type: object
      description: Individual error details
      properties:
        code:
          type: string
          description: Machine-readable error code
          example: invalid-request
        message:
          type: string
          description: Human-readable error message
          example: The request contains invalid parameters.
  responses:
    Unauthorized:
      description: Authentication required or failed (401)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: unauthenticated
                message: Please authenticate to perform this action.
    Forbidden:
      description: Caller lacks the required authority/role (403)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            errors:
              - code: forbidden
                message: You do not have permission to access this resource.
  securitySchemes:
    OAuth2:
      type: oauth2
      description: >
        OAuth2 client credentials flow. Token endpoints:

        - Staging:
        https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token

        - Production:
        https://login.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
      flows:
        clientCredentials:
          tokenUrl: >-
            https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
          scopes: {}

````