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

# Simulate a deposit to a virtual account

> Simulate a deposit to a virtual account in sandbox environment. This endpoint is only available in sandbox and allows testing deposit flows.

**Note:** This endpoint is only available in sandbox environment.




## OpenAPI

````yaml https://production.hifi.com/api/v2/openapi.json post /v2/users/{userId}/virtual-accounts/{accountId}/simulate-deposit
openapi: 3.0.0
info:
  title: Hifi API
  version: 2.0.0
  description: API documentation for Hifi
servers:
  - url: https://production.hifibridge.com
    description: Production server
  - url: https://sandbox.hifibridge.com
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Common
    description: Common endpoints
  - name: User
    description: User endpoints
  - name: Kyc
    description: Kyc endpoints
  - name: Wallet
    description: Wallet endpoints
  - name: Account
    description: Account endpoints
  - name: External Account
    description: External Account endpoints for managing beneficiary bank accounts
  - name: Fiat Account
    description: Fiat Account endpoints
  - name: Virtual Account
    description: Virtual Account endpoints
  - name: Onramp
    description: Onramp endpoints
  - name: Offramp
    description: Offramp endpoints
  - name: Orchestration Address
    description: >-
      Orchestration Address endpoints — persistent on-chain wallets that
      automatically off-ramp incoming stablecoin deposits to a USD bank account
  - name: Crypto Transfer
    description: Crypto Transfer endpoints
  - name: Cross-Chain Bridge
    description: Cross-Chain Bridge endpoints
  - name: Token Swap
    description: Token Swap endpoints
  - name: Canton Offers
    description: Canton Offers endpoints
  - name: Transfer Rules
    description: Transfer approval rules and configuration
  - name: Transfer Approvals
    description: Transfer approval workflow and admin actions
  - name: File
    description: File endpoints
  - name: Reporting
    description: Reporting and metrics endpoints
paths:
  /v2/users/{userId}/virtual-accounts/{accountId}/simulate-deposit:
    post:
      tags:
        - Virtual Account
      summary: Simulate a deposit to a virtual account
      description: >
        Simulate a deposit to a virtual account in sandbox environment. This
        endpoint is only available in sandbox and allows testing deposit flows.


        **Note:** This endpoint is only available in sandbox environment.
      parameters:
        - $ref: '#/components/parameters/UserIdPathParameter'
        - $ref: '#/components/parameters/VirtualAccountIdPathParameter'
      requestBody:
        $ref: '#/components/requestBodies/SimulateVirtualAccountDepositBody'
      responses:
        '200':
          $ref: '#/components/responses/SimulateVirtualAccountDepositResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  parameters:
    UserIdPathParameter:
      name: userId
      in: path
      schema:
        type: string
      description: ID of the user
      required: true
    VirtualAccountIdPathParameter:
      name: accountId
      in: path
      schema:
        type: string
      description: ID of the virtual account
      required: true
  requestBodies:
    SimulateVirtualAccountDepositBody:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimulateVirtualAccountDeposit'
  responses:
    SimulateVirtualAccountDepositResponse:
      description: Successfully triggered sandbox deposit
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimulateVirtualAccountDeposit'
          examples:
            VirtualAccountDepositSimulationObjectExample:
              $ref: >-
                #/components/examples/VirtualAccountDepositSimulationObjectExample
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  schemas:
    SimulateVirtualAccountDeposit:
      type: object
      title: Simulate Virtual Account Deposit
      properties:
        amount:
          type: string
          description: Amount to simulate deposit
        paymentRail:
          type: string
          enum:
            - WIRE
            - ACH
          description: >-
            Payment rail for the simulated deposit , recommended to use WIRE for
            faster settlement
        requestId:
          type: string
          description: Unique identifier for the request (recommend using uuid v4)
        source:
          type: object
          required:
            - routingNumber
            - accountNumber
            - name
            - bankName
          properties:
            routingNumber:
              type: string
              description: Routing number of the source bank account
            accountNumber:
              type: string
              description: Account number of the source bank account
            name:
              type: string
              description: Name on the source bank account
            bankName:
              type: string
              description: Name of the source bank
        userId:
          type: string
          description: Optional user ID to associate with this deposit
        reference:
          type: string
          description: Optional reference for this deposit
        description:
          type: string
          description: Optional description for this deposit
      required:
        - amount
        - paymentRail
        - requestId
        - source
    Unauthorized:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        error:
          type: string
          description: Error type
        errorDetails:
          type: string
          description: Detailed error message
    InternalServerError:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        error:
          type: string
          description: Error type
        errorDetails:
          type: string
          description: Detailed error message
  examples:
    VirtualAccountDepositSimulationObjectExample:
      summary: Virtual Account Deposit Simulation Object
      value:
        amount: '88.8'
        paymentRail: WIRE
        requestId: 550e8400-e29b-41d4-a716-446655440000
        source:
          routingNumber: '021000021'
          accountNumber: '123456789'
          name: Henry Wu
          bankName: Bank of NoWhere
        userId: 840c28f2-ea7d-5c3a-9271-b10fd8b6ae6d
        reference: Test deposit
        description: Simulated test deposit
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````