Skip to main content
POST
/
v2
/
onramp
/
create
Python (SDK)
from compass_api_sdk import CompassAPI


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.onramp.onramp_create(fiat_amount="<value>", destination_address="<value>", fiat_currency="USD")

    # Handle response
    print(res)
import { CompassApiSDK } from "@compass-labs/api-sdk";

const compassApiSDK = new CompassApiSDK({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});

async function run() {
const result = await compassApiSDK.onramp.onrampCreate({
fiatAmount: "<value>",
fiatCurrency: "USD",
destinationAddress: "<value>",
});

console.log(result);
}

run();
curl --request POST \
--url https://api.compasslabs.ai/v2/onramp/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"fiat_amount": "<string>",
"destination_address": "<string>",
"fiat_currency": "USD",
"quote_id": "<string>"
}
'
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fiat_amount: '<string>',
destination_address: '<string>',
fiat_currency: 'USD',
quote_id: '<string>'
})
};

fetch('https://api.compasslabs.ai/v2/onramp/create', 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://api.compasslabs.ai/v2/onramp/create",
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([
'fiat_amount' => '<string>',
'destination_address' => '<string>',
'fiat_currency' => 'USD',
'quote_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$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://api.compasslabs.ai/v2/onramp/create"

payload := strings.NewReader("{\n \"fiat_amount\": \"<string>\",\n \"destination_address\": \"<string>\",\n \"fiat_currency\": \"USD\",\n \"quote_id\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
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://api.compasslabs.ai/v2/onramp/create")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fiat_amount\": \"<string>\",\n \"destination_address\": \"<string>\",\n \"fiat_currency\": \"USD\",\n \"quote_id\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.compasslabs.ai/v2/onramp/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fiat_amount\": \"<string>\",\n \"destination_address\": \"<string>\",\n \"fiat_currency\": \"USD\",\n \"quote_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "payment_id": "<string>",
  "deposit_address": "<string>",
  "checkout_url": "<string>",
  "user_instructions": "<string>",
  "quote": {
    "fiat_amount": "<string>",
    "fiat_currency": "<string>",
    "output_amount": "<string>",
    "exchange_rate": "<string>",
    "fees": {
      "provider_fee": "<string>",
      "network_fee": "<string>",
      "business_fees": "0"
    },
    "output_asset": "USDC",
    "output_chain": "ethereum",
    "min_amount": "20",
    "max_amount": "10000",
    "expires_at": "<string>"
  }
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Body

application/json

Create a fiat on-ramp payment delivering USDC on Ethereum.

Carries the same fields as the quote (a quote is implicit — we do not persist a quote handle). quote_id is optional and only echoed upstream if Halliday's /payments/confirm requires a previously-issued quote handle; omit it to confirm against a fresh quote.

fiat_amount
string
required

Amount of fiat to spend, as a decimal string (e.g. 100).

Example:

"100"

destination_address
string
required

The wallet that will receive the USDC on Ethereum. Funds are delivered here directly — Compass never holds them.

Example:

"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"

fiat_currency
string
default:USD

ISO-4217 fiat currency code. Defaults to USD.

Example:

"USD"

quote_id
string | null

Optional Halliday quote handle to confirm against. Omit to confirm against a fresh quote derived from the amount and currency.

Response

Successful Response

A created on-ramp payment, with the browser-handoff affordances.

The caller (CLI / MCP agent / UI) presents checkout_url to the user to pay by card and complete identity verification, then polls GET /v2/onramp/status until status is delivered.

payment_id
string
required

Halliday's payment id. Use it to poll status.

deposit_address
string
required

The one-time-wallet (OTW) deposit address for this payment, owned solely by the user's wallet (non-custodial).

checkout_url
string
required

Compass-hosted checkout page to open in a browser. It renders the card + identity-verification flow and delivers USDC to the destination wallet.

user_instructions
string
required

Short, agent-actionable guidance: open the checkout link, pay, then poll status until delivered.

status
enum<string>
required

Initial lifecycle state (typically pending).

Available options:
pending,
processing,
delivered,
failed
quote
OnrampQuote · object
required

The resolved quote this payment was created against.