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

# Update on ramp virtual account



## OpenAPI

````yaml PATCH /v1/virtual-accounts/onramp/{id}
openapi: 3.1.0
info:
  title: Virtual Accounts
  version: '2.0'
servers:
  - description: Production Environment
    url: https://api.moonpay.com
  - description: Staging Environment
    url: https://api.moonpay-staging.com
security: []
paths:
  /v1/virtual-accounts/onramp/{id}:
    patch:
      tags:
        - Virtual Account On Ramp
      summary: Update on ramp virtual account
      operationId: VirtualAccountOnRampController.updateOnRampVirtualAccount
      parameters:
        - in: path
          name: id
          required: true
          schema:
            pattern: '[^\/#\?]+?'
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOnRampVirtualAccountBody'
        description: UpdateOnRampVirtualAccountBody
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualAccountResponse'
          description: ''
      security:
        - ApiKeyInQueryParamsAuth: []
components:
  schemas:
    UpdateOnRampVirtualAccountBody:
      properties:
        destination:
          $ref: '#/components/schemas/VirtualAccountCryptoWalletBody'
        destinationCurrencyCode:
          maxLength: 20
          minLength: 0
          type: string
      type: object
    VirtualAccountResponse:
      properties:
        createdAt:
          pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?
          type: string
        customerId:
          type: string
        destination:
          type: object
        destinationCurrency:
          type: object
        destinations:
          items: {}
          type: array
        externalCustomerId:
          type: string
        id:
          type: string
        organizationId:
          type: string
        source: {}
        sourceCurrency:
          type: object
        sources:
          items: {}
          type: array
        status:
          enum:
            - pending
            - completed
            - failed
            - manual_review
          type: string
        type:
          enum:
            - auto_on_ramp
            - auto_off_ramp
          type: string
        updatedAt:
          pattern: \d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+Z?
          type: string
      required:
        - id
        - type
        - destination
        - sourceCurrency
        - destinationCurrency
        - customerId
        - organizationId
        - createdAt
        - updatedAt
        - status
      type: object
    VirtualAccountCryptoWalletBody:
      properties:
        networkCode:
          enum:
            - akash
            - algorand
            - aptos
            - arbitrum
            - avalanche_c_chain
            - base
            - berachain
            - binance
            - binance_smart_chain
            - bitcoin
            - bitcoin_cash
            - bitcoin_testnet
            - bnb_chain
            - cardano
            - celo
            - celestia
            - core
            - cosmos
            - chiliz
            - cronos
            - dash
            - deversifi
            - digibyte
            - dogecoin
            - dydx
            - elrond
            - eosio
            - ethereum
            - ethereum_classic
            - fantom
            - filecoin
            - flow
            - flow_evm
            - gala
            - goerli
            - hedera
            - hive
            - hypercore
            - icp
            - immutable
            - injective
            - iota
            - kava
            - klaytn
            - kovan
            - lbry
            - linea
            - lisk
            - litecoin
            - litecoin_testnet
            - loopring
            - mantle
            - mina
            - mobilecoin
            - moca
            - monad
            - multiversx
            - mumbai
            - nano
            - near
            - nem
            - neo
            - nimiq
            - noble
            - oasis
            - okc
            - ontology
            - optimism
            - osmosis
            - palm
            - plasma
            - polkadot
            - polygon
            - qtum
            - ravencoin
            - rinkeby
            - ripple
            - ronin
            - sei
            - sepolia
            - simple_ledger_protocol
            - solana
            - sonic
            - sorare
            - starknet
            - stacks
            - stellar
            - sui
            - rune
            - terra
            - tezos
            - theta
            - tomochain
            - ton
            - tron
            - unichain
            - vechain
            - venom
            - waves
            - wax
            - worldchain
            - xrpl
            - zcash
            - zilliqa
            - zksync
          not:
            type: 'null'
          type: string
        walletAddress:
          maxLength: 255
          minLength: 0
          not:
            type: 'null'
          type: string
      required:
        - walletAddress
        - networkCode
      type: object
  securitySchemes:
    ApiKeyInQueryParamsAuth:
      description: |-
        API Key authentication using a publishable API key in the query string.
        The key is passed as the `apiKey` query parameter.
        Publishable keys are safe to expose in client-side code.
      in: query
      name: apiKey
      type: apiKey

````