Simulate an onramp deposit
curl --request POST \
--url https://production.hifi.com/v3/onramps/{onrampId}/simulate-deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 100,
"transferType": "ACH",
"reference": "REF-12345",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "John Doe",
"bankName": "Chase Bank"
}
}
'import requests
url = "https://production.hifi.com/v3/onramps/{onrampId}/simulate-deposits"
payload = {
"amount": 100,
"transferType": "ACH",
"reference": "REF-12345",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "John Doe",
"bankName": "Chase 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: 'REF-12345',
source: {
routingNumber: '021000021',
accountNumber: '123456789',
name: 'John Doe',
bankName: 'Chase Bank'
}
})
};
fetch('https://production.hifi.com/v3/onramps/{onrampId}/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/onramps/{onrampId}/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' => 'REF-12345',
'source' => [
'routingNumber' => '021000021',
'accountNumber' => '123456789',
'name' => 'John Doe',
'bankName' => 'Chase 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/onramps/{onrampId}/simulate-deposits"
payload := strings.NewReader("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"REF-12345\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"John Doe\",\n \"bankName\": \"Chase 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/onramps/{onrampId}/simulate-deposits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"REF-12345\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"John Doe\",\n \"bankName\": \"Chase Bank\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/onramps/{onrampId}/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\": \"REF-12345\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"John Doe\",\n \"bankName\": \"Chase Bank\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Simulated deposit submitted 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": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Onramps
Simulate an onramp deposit
Simulate an inbound fiat deposit against an onramp. Available in the sandbox environment only; unsupported for onramps not routed through a rail that supports simulation.
POST
/
v3
/
onramps
/
{onrampId}
/
simulate-deposits
Simulate an onramp deposit
curl --request POST \
--url https://production.hifi.com/v3/onramps/{onrampId}/simulate-deposits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 100,
"transferType": "ACH",
"reference": "REF-12345",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "John Doe",
"bankName": "Chase Bank"
}
}
'import requests
url = "https://production.hifi.com/v3/onramps/{onrampId}/simulate-deposits"
payload = {
"amount": 100,
"transferType": "ACH",
"reference": "REF-12345",
"source": {
"routingNumber": "021000021",
"accountNumber": "123456789",
"name": "John Doe",
"bankName": "Chase 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: 'REF-12345',
source: {
routingNumber: '021000021',
accountNumber: '123456789',
name: 'John Doe',
bankName: 'Chase Bank'
}
})
};
fetch('https://production.hifi.com/v3/onramps/{onrampId}/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/onramps/{onrampId}/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' => 'REF-12345',
'source' => [
'routingNumber' => '021000021',
'accountNumber' => '123456789',
'name' => 'John Doe',
'bankName' => 'Chase 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/onramps/{onrampId}/simulate-deposits"
payload := strings.NewReader("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"REF-12345\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"John Doe\",\n \"bankName\": \"Chase 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/onramps/{onrampId}/simulate-deposits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100,\n \"transferType\": \"ACH\",\n \"reference\": \"REF-12345\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"John Doe\",\n \"bankName\": \"Chase Bank\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/onramps/{onrampId}/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\": \"REF-12345\",\n \"source\": {\n \"routingNumber\": \"021000021\",\n \"accountNumber\": \"123456789\",\n \"name\": \"John Doe\",\n \"bankName\": \"Chase Bank\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Simulated deposit submitted 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": "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
Public ID of the onramp transaction (prefixed with onramp_)
Body
application/json
Simulate an inbound fiat deposit for an onramp. Sandbox only.
Simulate an inbound fiat deposit against an onramp in the sandbox environment.
Required range:
0.01 <= x <= 100000000Example:
100
Available options:
ACH, WIRE Example:
"ACH"
Simulated originating bank account for the sandbox deposit.
Show child attributes
Show child attributes
Optional reference code for the simulated deposit.
Maximum string length:
35Example:
"REF-12345"
Response
Simulated deposit submitted successfully.
Result of a simulated sandbox deposit.
Example:
"Simulated deposit submitted successfully."
⌘I