curl --request POST \
--url https://production.hifibridge.com/v2/onramps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"destination": {
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"isInstant": false,
"fee": {
"value": 1
}
}
'import requests
url = "https://production.hifibridge.com/v2/onramps"
payload = {
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"destination": {
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"isInstant": False,
"fee": { "value": 1 }
}
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({
requestId: '<string>',
source: {
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 1,
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
destination: {
amount: 1,
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
externalWalletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
isInstant: false,
fee: {value: 1}
})
};
fetch('https://production.hifibridge.com/v2/onramps', 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.hifibridge.com/v2/onramps",
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([
'requestId' => '<string>',
'source' => [
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 1,
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'destination' => [
'amount' => 1,
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'externalWalletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'isInstant' => false,
'fee' => [
'value' => 1
]
]),
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.hifibridge.com/v2/onramps"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"destination\": {\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"isInstant\": false,\n \"fee\": {\n \"value\": 1\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.hifibridge.com/v2/onramps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"destination\": {\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"isInstant\": false,\n \"fee\": {\n \"value\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifibridge.com/v2/onramps")
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 \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"destination\": {\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"isInstant\": false,\n \"fee\": {\n \"value\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"transferType": "ONRAMP",
"transferDetails": {
"id": "b26927e6-2771-423c-af44-a3c7a3e815c5",
"requestId": "e1047def-6942-4fd7-be04-e62eb41813b6",
"createdAt": "2025-02-03T17:15:31.927121+00:00",
"updatedAt": "2025-02-03T17:15:35.882+00:00",
"status": "OPEN_QUOTE",
"failedReason": null,
"source": {
"userId": "c15c0adf-3e45-4a62-b334-73aeec127649",
"currency": "usd",
"amount": 10,
"accountId": null,
"user": {
"email": "example@hifibridge.com",
"lastName": "Wu",
"firstName": "Henry",
"businessName": null
},
"bankInfo": null
},
"destination": {
"userId": "c15c0adf-3e45-4a62-b334-73aeec127649",
"currency": "usdc",
"chain": "POLYGON",
"walletAddress": "0x848732f6c834E05b17C56fa01E83EE095f72C3c3",
"externalWalletId": null,
"amount": null,
"user": {
"email": "example@hifibridge.com",
"lastName": "Wu",
"firstName": "Henry",
"businessName": null
}
},
"receipt": {
"transactionHash": null
},
"developerFee": null,
"virtualAccountId": null,
"quoteInformation": {
"sendGross": {
"amount": "10.00",
"currency": "usd"
},
"sendNet": {
"amount": "10.00",
"currency": "usd"
},
"railFee": {
"amount": "0.00",
"currency": "usdc"
},
"receiveGross": {
"amount": "10.00",
"currency": "usdc"
},
"receiveNet": {
"amount": "10.00",
"currency": "usdc"
},
"rate": "1.00",
"expiresAt": "N/A"
},
"depositInfo": null
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}Create an onramp
An onramp facilitates the conversion of fiat to crypto. Once the fiat payment is received, HIFI will deliver the converted crypto to the receiving user’s wallet.
There are two types of onramp:
-
Quote-based onramp: This type of onramp first returns the conversion rate quote based on the best market rate, which you can accept through the Accept an onramp quote endpoint to initiate the onramp.
Additionally, you can also refresh the onramp quote using the Refresh an onramp quote endpoint to refresh the conversion rate associated with the onramp. To learn more about quote-based onramps, click here. -
Non-quote-based onramp: This type of onramp will be initiated immediately upon creating an onramp.
curl --request POST \
--url https://production.hifibridge.com/v2/onramps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"destination": {
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"isInstant": false,
"fee": {
"value": 1
}
}
'import requests
url = "https://production.hifibridge.com/v2/onramps"
payload = {
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"destination": {
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"isInstant": False,
"fee": { "value": 1 }
}
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({
requestId: '<string>',
source: {
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 1,
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
destination: {
amount: 1,
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
externalWalletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
isInstant: false,
fee: {value: 1}
})
};
fetch('https://production.hifibridge.com/v2/onramps', 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.hifibridge.com/v2/onramps",
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([
'requestId' => '<string>',
'source' => [
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 1,
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'destination' => [
'amount' => 1,
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'externalWalletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'isInstant' => false,
'fee' => [
'value' => 1
]
]),
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.hifibridge.com/v2/onramps"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"destination\": {\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"isInstant\": false,\n \"fee\": {\n \"value\": 1\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.hifibridge.com/v2/onramps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"destination\": {\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"isInstant\": false,\n \"fee\": {\n \"value\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifibridge.com/v2/onramps")
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 \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"destination\": {\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"isInstant\": false,\n \"fee\": {\n \"value\": 1\n }\n}"
response = http.request(request)
puts response.read_body{
"transferType": "ONRAMP",
"transferDetails": {
"id": "b26927e6-2771-423c-af44-a3c7a3e815c5",
"requestId": "e1047def-6942-4fd7-be04-e62eb41813b6",
"createdAt": "2025-02-03T17:15:31.927121+00:00",
"updatedAt": "2025-02-03T17:15:35.882+00:00",
"status": "OPEN_QUOTE",
"failedReason": null,
"source": {
"userId": "c15c0adf-3e45-4a62-b334-73aeec127649",
"currency": "usd",
"amount": 10,
"accountId": null,
"user": {
"email": "example@hifibridge.com",
"lastName": "Wu",
"firstName": "Henry",
"businessName": null
},
"bankInfo": null
},
"destination": {
"userId": "c15c0adf-3e45-4a62-b334-73aeec127649",
"currency": "usdc",
"chain": "POLYGON",
"walletAddress": "0x848732f6c834E05b17C56fa01E83EE095f72C3c3",
"externalWalletId": null,
"amount": null,
"user": {
"email": "example@hifibridge.com",
"lastName": "Wu",
"firstName": "Henry",
"businessName": null
}
},
"receipt": {
"transactionHash": null
},
"developerFee": null,
"virtualAccountId": null,
"quoteInformation": {
"sendGross": {
"amount": "10.00",
"currency": "usd"
},
"sendNet": {
"amount": "10.00",
"currency": "usd"
},
"railFee": {
"amount": "0.00",
"currency": "usdc"
},
"receiveGross": {
"amount": "10.00",
"currency": "usdc"
},
"receiveNet": {
"amount": "10.00",
"currency": "usdc"
},
"rate": "1.00",
"expiresAt": "N/A"
},
"depositInfo": null
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- Onramp
- Onramp (USD)
- Onramp (BRL)
- Onramp (MXN)
- Onramp (Africa)
unique identifier for the request (recommend using uuid v4)
onramp source
Show child attributes
Show child attributes
onramp destination
Show child attributes
Show child attributes
gift, bills, groceries, travel, health, entertainment, housing, school-fees, other instant onramp. coming soon ...
custom onramp fee, omit if no fee is charged
Show child attributes
Show child attributes