Simulate a virtual account deposit
curl --request POST \
--url https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 100,
"transferType": "ACH",
"reference": "INV-2026-0001",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "Jane Doe",
"bankName": "Example Bank"
}
}
'import requests
url = "https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits"
payload = {
"amount": 100,
"transferType": "ACH",
"reference": "INV-2026-0001",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "Jane Doe",
"bankName": "Example Bank"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 100,
transferType: 'ACH',
reference: 'INV-2026-0001',
source: {
routingNumber: '021000021',
accountNumber: '123456789',
name: 'Jane Doe',
bankName: 'Example Bank'
}
})
};
fetch('https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 100,
'transferType' => 'ACH',
'reference' => 'INV-2026-0001',
'source' => [
'routingNumber' => '021000021',
'accountNumber' => '123456789',
'name' => 'Jane Doe',
'bankName' => 'Example Bank'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits"
payload := strings.NewReader("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"INV-2026-0001\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"Jane Doe\",\n \"bankName\": \"Example Bank\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"INV-2026-0001\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"Jane Doe\",\n \"bankName\": \"Example Bank\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"INV-2026-0001\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"Jane Doe\",\n \"bankName\": \"Example Bank\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Deposit simulated successfully."
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "RESOURCE_CONFLICT",
"message": "Resource already exists or conflicts with current state"
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Virtual Accounts
Simulate a virtual account deposit
Sandbox only. Simulates an inbound fiat deposit into the virtual account so the resulting onramp flow can be tested end to end.
POST
/
v3
/
users
/
{userId}
/
virtual-accounts
/
{virtualAccountId}
/
simulate-deposits
Simulate a virtual account deposit
curl --request POST \
--url https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 100,
"transferType": "ACH",
"reference": "INV-2026-0001",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "Jane Doe",
"bankName": "Example Bank"
}
}
'import requests
url = "https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits"
payload = {
"amount": 100,
"transferType": "ACH",
"reference": "INV-2026-0001",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "Jane Doe",
"bankName": "Example Bank"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 100,
transferType: 'ACH',
reference: 'INV-2026-0001',
source: {
routingNumber: '021000021',
accountNumber: '123456789',
name: 'Jane Doe',
bankName: 'Example Bank'
}
})
};
fetch('https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 100,
'transferType' => 'ACH',
'reference' => 'INV-2026-0001',
'source' => [
'routingNumber' => '021000021',
'accountNumber' => '123456789',
'name' => 'Jane Doe',
'bankName' => 'Example Bank'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits"
payload := strings.NewReader("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"INV-2026-0001\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"Jane Doe\",\n \"bankName\": \"Example Bank\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"INV-2026-0001\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"Jane Doe\",\n \"bankName\": \"Example Bank\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/users/{userId}/virtual-accounts/{virtualAccountId}/simulate-deposits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"INV-2026-0001\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"Jane Doe\",\n \"bankName\": \"Example Bank\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Deposit simulated successfully."
}{
"type": "VALIDATION_ERROR",
"message": "One or more fields are invalid or missing.",
"fields": [
{
"code": "invalid_value",
"message": "Must be a valid email address",
"field": "email"
}
]
}{
"type": "UNAUTHORIZED",
"message": "Authentication required"
}{
"type": "RESOURCE_NOT_FOUND",
"message": "<string>",
"fields": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}{
"type": "RESOURCE_CONFLICT",
"message": "Resource already exists or conflicts with current state"
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the user.
Pattern:
^user_[A-Za-z0-9]+$Public ID of the virtual account (prefixed with va_)
Body
application/json
Sandbox-only. Simulates an inbound fiat deposit into the virtual account so the resulting onramp flow can be observed end to end.
Sandbox-only simulated deposit request.
Deposit amount in the source fiat currency.
Required range:
0.01 <= x <= 100000000Example:
100
Fiat transfer rail to simulate.
Available options:
ACH, WIRE Example:
"ACH"
Simulated sending bank account details.
Show child attributes
Show child attributes
Optional payment reference.
Maximum string length:
35Example:
"INV-2026-0001"
Response
Sandbox deposit simulated successfully.
A simple message acknowledgement.
Example:
"Success"
⌘I