curl --request POST \
--url https://production.hifi.com/v3/onramps/{onrampId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://production.hifi.com/v3/onramps/{onrampId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://production.hifi.com/v3/onramps/{onrampId}/cancel', 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}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://production.hifi.com/v3/onramps/{onrampId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/onramps/{onrampId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"<<": {
"id": "onramp_7bV1aLcs3Kf9dQ2mNpXwZ",
"requestId": "b3d1f2a4-5c6e-7890-abcd-ef1234567890",
"status": "AWAITING_FUNDS",
"failedReason": null,
"error": null,
"errorDetails": null,
"source": {
"amount": 100,
"currency": "USD",
"userId": "usr_3Kf9dQ2mNpXwZ7bV1aLcs",
"externalAccountId": null,
"virtualAccountId": null,
"depositInstructions": {
"bankName": "Cross River Bank",
"bankAddress": "2115 Linwood Ave, Fort Lee, NJ 07024",
"beneficiary": {
"name": "HIFI Bridge Inc",
"address": "123 Main Street, New York, NY, 10001, USA"
},
"ach": {
"routingNumber": "021000021",
"accountNumber": "123456789"
},
"wire": {
"routingNumber": "021000021",
"accountNumber": "123456789"
},
"rtp": {
"routingNumber": "021000021",
"accountNumber": "123456789"
},
"reference": "HIFI-9A2B",
"depositBy": "2026-07-02T10:30:00.000Z",
"instruction": "Please deposit USD to the bank account provided. For USDT onramp, a minimum of $10 is required, or the funds will be returned."
},
"depositTracking": null
},
"destination": {
"chain": "POLYGON",
"amount": 100,
"currency": "USDC",
"userId": "usr_3Kf9dQ2mNpXwZ7bV1aLcs",
"walletId": "wlt_1aLcs3Kf9dQ2mNpXwZ7bV",
"externalWalletId": null,
"walletAddress": "0x1234567890abcdef1234567890abcdef12345678"
},
"receipt": {
"transactionHash": null
},
"settlement": null,
"quote": {
"sendGross": {
"amount": "100.00",
"currency": "USD"
},
"sendNet": {
"amount": "100.00",
"currency": "USD"
},
"railFee": {
"amount": "0.00",
"currency": "USDC"
},
"receiveGross": {
"amount": "100.00",
"currency": "USDC"
},
"receiveNet": {
"amount": "100.00",
"currency": "USDC"
},
"rate": "1.00",
"conversionFee": {
"amount": "0",
"currency": "USDC",
"description": "No conversion fee applicable",
"timing": "N/A"
},
"expiresAt": "N/A"
},
"microDeposits": {
"count": 0,
"data": []
},
"sameDayAch": false,
"description": "Monthly top-up",
"createdAt": "2026-07-01T10:30:00.000Z",
"updatedAt": "2026-07-01T10:30:00.000Z"
},
"status": "CANCELLED"
}{
"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": "ACTION_NOT_ALLOWED",
"message": "This action is not allowed"
}{
"type": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred"
}Cancel an onramp
Cancel an onramp that is in review. Only onramps with status IN_REVIEW can be cancelled.
curl --request POST \
--url https://production.hifi.com/v3/onramps/{onrampId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://production.hifi.com/v3/onramps/{onrampId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://production.hifi.com/v3/onramps/{onrampId}/cancel', 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}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://production.hifi.com/v3/onramps/{onrampId}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifi.com/v3/onramps/{onrampId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"<<": {
"id": "onramp_7bV1aLcs3Kf9dQ2mNpXwZ",
"requestId": "b3d1f2a4-5c6e-7890-abcd-ef1234567890",
"status": "AWAITING_FUNDS",
"failedReason": null,
"error": null,
"errorDetails": null,
"source": {
"amount": 100,
"currency": "USD",
"userId": "usr_3Kf9dQ2mNpXwZ7bV1aLcs",
"externalAccountId": null,
"virtualAccountId": null,
"depositInstructions": {
"bankName": "Cross River Bank",
"bankAddress": "2115 Linwood Ave, Fort Lee, NJ 07024",
"beneficiary": {
"name": "HIFI Bridge Inc",
"address": "123 Main Street, New York, NY, 10001, USA"
},
"ach": {
"routingNumber": "021000021",
"accountNumber": "123456789"
},
"wire": {
"routingNumber": "021000021",
"accountNumber": "123456789"
},
"rtp": {
"routingNumber": "021000021",
"accountNumber": "123456789"
},
"reference": "HIFI-9A2B",
"depositBy": "2026-07-02T10:30:00.000Z",
"instruction": "Please deposit USD to the bank account provided. For USDT onramp, a minimum of $10 is required, or the funds will be returned."
},
"depositTracking": null
},
"destination": {
"chain": "POLYGON",
"amount": 100,
"currency": "USDC",
"userId": "usr_3Kf9dQ2mNpXwZ7bV1aLcs",
"walletId": "wlt_1aLcs3Kf9dQ2mNpXwZ7bV",
"externalWalletId": null,
"walletAddress": "0x1234567890abcdef1234567890abcdef12345678"
},
"receipt": {
"transactionHash": null
},
"settlement": null,
"quote": {
"sendGross": {
"amount": "100.00",
"currency": "USD"
},
"sendNet": {
"amount": "100.00",
"currency": "USD"
},
"railFee": {
"amount": "0.00",
"currency": "USDC"
},
"receiveGross": {
"amount": "100.00",
"currency": "USDC"
},
"receiveNet": {
"amount": "100.00",
"currency": "USDC"
},
"rate": "1.00",
"conversionFee": {
"amount": "0",
"currency": "USDC",
"description": "No conversion fee applicable",
"timing": "N/A"
},
"expiresAt": "N/A"
},
"microDeposits": {
"count": 0,
"data": []
},
"sameDayAch": false,
"description": "Monthly top-up",
"createdAt": "2026-07-01T10:30:00.000Z",
"updatedAt": "2026-07-01T10:30:00.000Z"
},
"status": "CANCELLED"
}{
"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": "ACTION_NOT_ALLOWED",
"message": "This action is not allowed"
}{
"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_)
Response
Onramp cancelled successfully.
An onramp transaction.
Public ID of the onramp (prefixed with onramp_).
"onramp_7bV1aLcs3Kf9dQ2mNpXwZ"
Client-supplied idempotency key from the create request.
"b3d1f2a4-5c6e-7890-abcd-ef1234567890"
Lifecycle status of the onramp transaction.
NOT_INITIATED, CREATED, OPEN_QUOTE, IN_REVIEW, FIAT_INITIATED, AWAITING_FUNDS, FIAT_PENDING, FIAT_PROCESSED, CRYPTO_INITIATED, CRYPTO_PENDING, COMPLETED, FIAT_FAILED, FIAT_RETURNED, CRYPTO_FAILED, QUOTE_FAILED, EXPIRED, UNKNOWN, CANCELLED "AWAITING_FUNDS"
Machine-readable reason when the onramp failed.
null
User-facing error summary when the onramp failed.
null
User-facing error detail when the onramp failed.
null
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Settlement breakdown once funds settle.
Conversion quote for the onramp.
Show child attributes
Show child attributes
Micro-deposits received against the onramp while awaiting funds.
Show child attributes
Show child attributes
false
"Monthly top-up"
"2026-07-01T10:30:00.000Z"
"2026-07-01T10:30:00.000Z"