curl --request POST \
--url https://production.hifibridge.com/v2/offramps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"returnAddress": "<string>"
},
"destination": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sameDayAch": false,
"achReference": "<string>",
"sepaReference": "<string>",
"wireMessage": "<string>",
"paymentReference": "<string>",
"swiftReference": "<string>"
},
"supportingDocumentUrl": "<string>",
"description": "<string>",
"developerFee": {
"fees": [
{
"value": "<string>",
"walletAddress": "<string>"
}
]
},
"requireApproval": false,
"supportingInformation": {
"detailedPurposeOfPayment": "<string>",
"beneficiaryDetails": {
"legalEntityName": "<string>",
"jurisdictionOfIncorporation": "<string>",
"natureOfBusiness": "<string>",
"relationshipToBeneficiary": "<string>",
"website": "<string>"
},
"documents": [
{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
]
}
}
'import requests
url = "https://production.hifibridge.com/v2/offramps"
payload = {
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"returnAddress": "<string>"
},
"destination": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sameDayAch": False,
"achReference": "<string>",
"sepaReference": "<string>",
"wireMessage": "<string>",
"paymentReference": "<string>",
"swiftReference": "<string>"
},
"supportingDocumentUrl": "<string>",
"description": "<string>",
"developerFee": { "fees": [
{
"value": "<string>",
"walletAddress": "<string>"
}
] },
"requireApproval": False,
"supportingInformation": {
"detailedPurposeOfPayment": "<string>",
"beneficiaryDetails": {
"legalEntityName": "<string>",
"jurisdictionOfIncorporation": "<string>",
"natureOfBusiness": "<string>",
"relationshipToBeneficiary": "<string>",
"website": "<string>"
},
"documents": [
{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
]
}
}
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,
externalWalletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
returnAddress: '<string>'
},
destination: {
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 1,
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sameDayAch: false,
achReference: '<string>',
sepaReference: '<string>',
wireMessage: '<string>',
paymentReference: '<string>',
swiftReference: '<string>'
},
supportingDocumentUrl: '<string>',
description: '<string>',
developerFee: {fees: [{value: '<string>', walletAddress: '<string>'}]},
requireApproval: false,
supportingInformation: {
detailedPurposeOfPayment: '<string>',
beneficiaryDetails: {
legalEntityName: '<string>',
jurisdictionOfIncorporation: '<string>',
natureOfBusiness: '<string>',
relationshipToBeneficiary: '<string>',
website: '<string>'
},
documents: [{fileId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', description: '<string>'}]
}
})
};
fetch('https://production.hifibridge.com/v2/offramps', 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/offramps",
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,
'externalWalletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'returnAddress' => '<string>'
],
'destination' => [
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 1,
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sameDayAch' => false,
'achReference' => '<string>',
'sepaReference' => '<string>',
'wireMessage' => '<string>',
'paymentReference' => '<string>',
'swiftReference' => '<string>'
],
'supportingDocumentUrl' => '<string>',
'description' => '<string>',
'developerFee' => [
'fees' => [
[
'value' => '<string>',
'walletAddress' => '<string>'
]
]
],
'requireApproval' => false,
'supportingInformation' => [
'detailedPurposeOfPayment' => '<string>',
'beneficiaryDetails' => [
'legalEntityName' => '<string>',
'jurisdictionOfIncorporation' => '<string>',
'natureOfBusiness' => '<string>',
'relationshipToBeneficiary' => '<string>',
'website' => '<string>'
],
'documents' => [
[
'fileId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => '<string>'
]
]
]
]),
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/offramps"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"returnAddress\": \"<string>\"\n },\n \"destination\": {\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sameDayAch\": false,\n \"achReference\": \"<string>\",\n \"sepaReference\": \"<string>\",\n \"wireMessage\": \"<string>\",\n \"paymentReference\": \"<string>\",\n \"swiftReference\": \"<string>\"\n },\n \"supportingDocumentUrl\": \"<string>\",\n \"description\": \"<string>\",\n \"developerFee\": {\n \"fees\": [\n {\n \"value\": \"<string>\",\n \"walletAddress\": \"<string>\"\n }\n ]\n },\n \"requireApproval\": false,\n \"supportingInformation\": {\n \"detailedPurposeOfPayment\": \"<string>\",\n \"beneficiaryDetails\": {\n \"legalEntityName\": \"<string>\",\n \"jurisdictionOfIncorporation\": \"<string>\",\n \"natureOfBusiness\": \"<string>\",\n \"relationshipToBeneficiary\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"documents\": [\n {\n \"fileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\"\n }\n ]\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/offramps")
.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 \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"returnAddress\": \"<string>\"\n },\n \"destination\": {\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sameDayAch\": false,\n \"achReference\": \"<string>\",\n \"sepaReference\": \"<string>\",\n \"wireMessage\": \"<string>\",\n \"paymentReference\": \"<string>\",\n \"swiftReference\": \"<string>\"\n },\n \"supportingDocumentUrl\": \"<string>\",\n \"description\": \"<string>\",\n \"developerFee\": {\n \"fees\": [\n {\n \"value\": \"<string>\",\n \"walletAddress\": \"<string>\"\n }\n ]\n },\n \"requireApproval\": false,\n \"supportingInformation\": {\n \"detailedPurposeOfPayment\": \"<string>\",\n \"beneficiaryDetails\": {\n \"legalEntityName\": \"<string>\",\n \"jurisdictionOfIncorporation\": \"<string>\",\n \"natureOfBusiness\": \"<string>\",\n \"relationshipToBeneficiary\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"documents\": [\n {\n \"fileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifibridge.com/v2/offramps")
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 \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"returnAddress\": \"<string>\"\n },\n \"destination\": {\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sameDayAch\": false,\n \"achReference\": \"<string>\",\n \"sepaReference\": \"<string>\",\n \"wireMessage\": \"<string>\",\n \"paymentReference\": \"<string>\",\n \"swiftReference\": \"<string>\"\n },\n \"supportingDocumentUrl\": \"<string>\",\n \"description\": \"<string>\",\n \"developerFee\": {\n \"fees\": [\n {\n \"value\": \"<string>\",\n \"walletAddress\": \"<string>\"\n }\n ]\n },\n \"requireApproval\": false,\n \"supportingInformation\": {\n \"detailedPurposeOfPayment\": \"<string>\",\n \"beneficiaryDetails\": {\n \"legalEntityName\": \"<string>\",\n \"jurisdictionOfIncorporation\": \"<string>\",\n \"natureOfBusiness\": \"<string>\",\n \"relationshipToBeneficiary\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"documents\": [\n {\n \"fileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"transferType": "OFFRAMP",
"transferDetails": {
"id": "173c1e89-7bbd-4352-9e5d-73807681510d",
"requestId": "201ca31d-700f-4c76-ac4b-961623acbb79",
"createdAt": "2025-02-03T16:12:04.331652+00:00",
"updatedAt": "2025-02-03T16:12:08.732+00:00",
"status": "OPEN_QUOTE",
"failedReason": null,
"source": {
"userId": "7d54a7a7-dac3-4313-8b09-27fa4b7fd1ee",
"chain": "POLYGON",
"currency": "usdc",
"amount": 10,
"walletAddress": "0x366B759bAA089Fa57a08edd3F2E028E86b97f8D6",
"user": {
"email": "john.doe@hifibridge.com",
"firstName": "John",
"lastName": "Doe",
"businessName": null
}
},
"destination": {
"userId": "7d54a7a7-dac3-4313-8b09-27fa4b7fd1ee",
"amount": 0,
"currency": "usd",
"wireMessage": "Wire message",
"achReference": "ACH reference",
"paymentReference": "Payment reference",
"user": {
"email": "john.doe@hifibridge.com",
"firstName": "John",
"lastName": "Doe",
"businessName": null
},
"accountId": "12c1c496-8f57-41a1-8292-dbe6547791ce"
},
"receipt": {
"transactionHash": null,
"paymentTracking": null
},
"developerFee": {
"id": "1c3d24c1-6136-574c-a647-e7eb6a9fb6ed",
"transactionHash": null,
"fees": [
{
"type": "PERCENTAGE",
"value": "0.0005",
"amount": "0.000515",
"walletAddress": "0x366B759bAA089Fa57a08edd3F2E028E86b97f8D7"
},
{
"type": "FLAT",
"value": "0.01",
"amount": "0.010000",
"walletAddress": "0x366B759bAA089Fa57a08edd3F2E028E86b97f8D7"
}
]
},
"quoteInformation": {
"sendGross": {
"amount": "10",
"currency": "usdc"
},
"sendNet": {
"amount": "10",
"currency": "usdc"
},
"receiveGross": {
"amount": "10",
"currency": "usd"
},
"receiveNet": {
"amount": "10",
"currency": "usd"
},
"rate": "1"
},
"depositInformation": []
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}Create an offramp
An offramp facilitates the conversion of crypto to fiat. Once the crypto transfer is confirmed, HIFI will deposit the converted fiat into the receiving user’s bank account.
There are two types of offramp:
-
Quote-based offramp: This type of offramp first returns the conversion rate quote based on the best market rate, which you can accept through the Accept an offramp quote endpoint to initiate the offramp.
To learn more about quote-based offramps, click here. -
Non-quote-based offramp: This type of offramp will be initiated immediately upon creating an offramp.
curl --request POST \
--url https://production.hifibridge.com/v2/offramps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"returnAddress": "<string>"
},
"destination": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sameDayAch": false,
"achReference": "<string>",
"sepaReference": "<string>",
"wireMessage": "<string>",
"paymentReference": "<string>",
"swiftReference": "<string>"
},
"supportingDocumentUrl": "<string>",
"description": "<string>",
"developerFee": {
"fees": [
{
"value": "<string>",
"walletAddress": "<string>"
}
]
},
"requireApproval": false,
"supportingInformation": {
"detailedPurposeOfPayment": "<string>",
"beneficiaryDetails": {
"legalEntityName": "<string>",
"jurisdictionOfIncorporation": "<string>",
"natureOfBusiness": "<string>",
"relationshipToBeneficiary": "<string>",
"website": "<string>"
},
"documents": [
{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
]
}
}
'import requests
url = "https://production.hifibridge.com/v2/offramps"
payload = {
"requestId": "<string>",
"source": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"externalWalletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"returnAddress": "<string>"
},
"destination": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 1,
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sameDayAch": False,
"achReference": "<string>",
"sepaReference": "<string>",
"wireMessage": "<string>",
"paymentReference": "<string>",
"swiftReference": "<string>"
},
"supportingDocumentUrl": "<string>",
"description": "<string>",
"developerFee": { "fees": [
{
"value": "<string>",
"walletAddress": "<string>"
}
] },
"requireApproval": False,
"supportingInformation": {
"detailedPurposeOfPayment": "<string>",
"beneficiaryDetails": {
"legalEntityName": "<string>",
"jurisdictionOfIncorporation": "<string>",
"natureOfBusiness": "<string>",
"relationshipToBeneficiary": "<string>",
"website": "<string>"
},
"documents": [
{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
]
}
}
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,
externalWalletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
returnAddress: '<string>'
},
destination: {
accountId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 1,
userId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sameDayAch: false,
achReference: '<string>',
sepaReference: '<string>',
wireMessage: '<string>',
paymentReference: '<string>',
swiftReference: '<string>'
},
supportingDocumentUrl: '<string>',
description: '<string>',
developerFee: {fees: [{value: '<string>', walletAddress: '<string>'}]},
requireApproval: false,
supportingInformation: {
detailedPurposeOfPayment: '<string>',
beneficiaryDetails: {
legalEntityName: '<string>',
jurisdictionOfIncorporation: '<string>',
natureOfBusiness: '<string>',
relationshipToBeneficiary: '<string>',
website: '<string>'
},
documents: [{fileId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', description: '<string>'}]
}
})
};
fetch('https://production.hifibridge.com/v2/offramps', 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/offramps",
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,
'externalWalletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'returnAddress' => '<string>'
],
'destination' => [
'accountId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 1,
'userId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sameDayAch' => false,
'achReference' => '<string>',
'sepaReference' => '<string>',
'wireMessage' => '<string>',
'paymentReference' => '<string>',
'swiftReference' => '<string>'
],
'supportingDocumentUrl' => '<string>',
'description' => '<string>',
'developerFee' => [
'fees' => [
[
'value' => '<string>',
'walletAddress' => '<string>'
]
]
],
'requireApproval' => false,
'supportingInformation' => [
'detailedPurposeOfPayment' => '<string>',
'beneficiaryDetails' => [
'legalEntityName' => '<string>',
'jurisdictionOfIncorporation' => '<string>',
'natureOfBusiness' => '<string>',
'relationshipToBeneficiary' => '<string>',
'website' => '<string>'
],
'documents' => [
[
'fileId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'description' => '<string>'
]
]
]
]),
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/offramps"
payload := strings.NewReader("{\n \"requestId\": \"<string>\",\n \"source\": {\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"returnAddress\": \"<string>\"\n },\n \"destination\": {\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sameDayAch\": false,\n \"achReference\": \"<string>\",\n \"sepaReference\": \"<string>\",\n \"wireMessage\": \"<string>\",\n \"paymentReference\": \"<string>\",\n \"swiftReference\": \"<string>\"\n },\n \"supportingDocumentUrl\": \"<string>\",\n \"description\": \"<string>\",\n \"developerFee\": {\n \"fees\": [\n {\n \"value\": \"<string>\",\n \"walletAddress\": \"<string>\"\n }\n ]\n },\n \"requireApproval\": false,\n \"supportingInformation\": {\n \"detailedPurposeOfPayment\": \"<string>\",\n \"beneficiaryDetails\": {\n \"legalEntityName\": \"<string>\",\n \"jurisdictionOfIncorporation\": \"<string>\",\n \"natureOfBusiness\": \"<string>\",\n \"relationshipToBeneficiary\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"documents\": [\n {\n \"fileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\"\n }\n ]\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/offramps")
.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 \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"returnAddress\": \"<string>\"\n },\n \"destination\": {\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sameDayAch\": false,\n \"achReference\": \"<string>\",\n \"sepaReference\": \"<string>\",\n \"wireMessage\": \"<string>\",\n \"paymentReference\": \"<string>\",\n \"swiftReference\": \"<string>\"\n },\n \"supportingDocumentUrl\": \"<string>\",\n \"description\": \"<string>\",\n \"developerFee\": {\n \"fees\": [\n {\n \"value\": \"<string>\",\n \"walletAddress\": \"<string>\"\n }\n ]\n },\n \"requireApproval\": false,\n \"supportingInformation\": {\n \"detailedPurposeOfPayment\": \"<string>\",\n \"beneficiaryDetails\": {\n \"legalEntityName\": \"<string>\",\n \"jurisdictionOfIncorporation\": \"<string>\",\n \"natureOfBusiness\": \"<string>\",\n \"relationshipToBeneficiary\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"documents\": [\n {\n \"fileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifibridge.com/v2/offramps")
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 \"externalWalletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"returnAddress\": \"<string>\"\n },\n \"destination\": {\n \"accountId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 1,\n \"userId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sameDayAch\": false,\n \"achReference\": \"<string>\",\n \"sepaReference\": \"<string>\",\n \"wireMessage\": \"<string>\",\n \"paymentReference\": \"<string>\",\n \"swiftReference\": \"<string>\"\n },\n \"supportingDocumentUrl\": \"<string>\",\n \"description\": \"<string>\",\n \"developerFee\": {\n \"fees\": [\n {\n \"value\": \"<string>\",\n \"walletAddress\": \"<string>\"\n }\n ]\n },\n \"requireApproval\": false,\n \"supportingInformation\": {\n \"detailedPurposeOfPayment\": \"<string>\",\n \"beneficiaryDetails\": {\n \"legalEntityName\": \"<string>\",\n \"jurisdictionOfIncorporation\": \"<string>\",\n \"natureOfBusiness\": \"<string>\",\n \"relationshipToBeneficiary\": \"<string>\",\n \"website\": \"<string>\"\n },\n \"documents\": [\n {\n \"fileId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"transferType": "OFFRAMP",
"transferDetails": {
"id": "173c1e89-7bbd-4352-9e5d-73807681510d",
"requestId": "201ca31d-700f-4c76-ac4b-961623acbb79",
"createdAt": "2025-02-03T16:12:04.331652+00:00",
"updatedAt": "2025-02-03T16:12:08.732+00:00",
"status": "OPEN_QUOTE",
"failedReason": null,
"source": {
"userId": "7d54a7a7-dac3-4313-8b09-27fa4b7fd1ee",
"chain": "POLYGON",
"currency": "usdc",
"amount": 10,
"walletAddress": "0x366B759bAA089Fa57a08edd3F2E028E86b97f8D6",
"user": {
"email": "john.doe@hifibridge.com",
"firstName": "John",
"lastName": "Doe",
"businessName": null
}
},
"destination": {
"userId": "7d54a7a7-dac3-4313-8b09-27fa4b7fd1ee",
"amount": 0,
"currency": "usd",
"wireMessage": "Wire message",
"achReference": "ACH reference",
"paymentReference": "Payment reference",
"user": {
"email": "john.doe@hifibridge.com",
"firstName": "John",
"lastName": "Doe",
"businessName": null
},
"accountId": "12c1c496-8f57-41a1-8292-dbe6547791ce"
},
"receipt": {
"transactionHash": null,
"paymentTracking": null
},
"developerFee": {
"id": "1c3d24c1-6136-574c-a647-e7eb6a9fb6ed",
"transactionHash": null,
"fees": [
{
"type": "PERCENTAGE",
"value": "0.0005",
"amount": "0.000515",
"walletAddress": "0x366B759bAA089Fa57a08edd3F2E028E86b97f8D7"
},
{
"type": "FLAT",
"value": "0.01",
"amount": "0.010000",
"walletAddress": "0x366B759bAA089Fa57a08edd3F2E028E86b97f8D7"
}
]
},
"quoteInformation": {
"sendGross": {
"amount": "10",
"currency": "usdc"
},
"sendNet": {
"amount": "10",
"currency": "usdc"
},
"receiveGross": {
"amount": "10",
"currency": "usd"
},
"receiveNet": {
"amount": "10",
"currency": "usd"
},
"rate": "1"
},
"depositInformation": []
}
}{
"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
- Offramp
- Offramp (USD)
- Offramp (BRL)
- Offramp (COP)
- Offramp (MXN)
- Offramp (ARS)
- Offramp (Africa)
- Offramp Global Network (BRL)
- Offramp Global Network (MXN)
- Offramp Global Network (NGN)
- Offramp Global Network (HKD)
- Offramp Global Network (CHN)
unique identifier for the request (recommend using uuid v4)
offramp source
- funds from a HIFI Wallet
- funds from an external wallet
Show child attributes
Show child attributes
offramp destination
Show child attributes
Show child attributes
The type of supporting document, required for swift payment.
billing_document, order_document, shipment_document, regulatory_document, transport_document, other_document The URL of the supporting document, required for swift payment.
Memo code or description for usd offramp.
custom offramp fees, omit if no fees are charged
Show child attributes
Show child attributes
Whether this offramp requires approval before processing.
true: Offramp will enter approval workflowfalseor omitted: Offramp proceeds like usual
false
Optional supporting information for the offramp. May include detailed purpose of payment, beneficiary details, and supporting documents. When provided, documents must reference files previously uploaded via the file upload API.
Show child attributes
Show child attributes
Sandbox-only field that forces this offramp to a predetermined outcome
FIAT_FAILED, CRYPTO_FAILED, COMPLETED