curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"smartAccount": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91",
"baseCountry": "US",
"baseCurrencyCode": "USD",
"locale": "<string>",
"connection": "<string>",
"acceptedExchangeFeeBps": 5000,
"connections": [
"coinbase",
"kraken"
],
"merchantName": "Superform",
"merchantLogoUrl": "https://cdn.example.com/logo.svg"
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url"
payload = {
"smartAccount": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91",
"baseCountry": "US",
"baseCurrencyCode": "USD",
"locale": "<string>",
"connection": "<string>",
"acceptedExchangeFeeBps": 5000,
"connections": ["coinbase", "kraken"],
"merchantName": "Superform",
"merchantLogoUrl": "https://cdn.example.com/logo.svg"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
smartAccount: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91',
baseCountry: 'US',
baseCurrencyCode: 'USD',
locale: '<string>',
connection: '<string>',
acceptedExchangeFeeBps: 5000,
connections: ['coinbase', 'kraken'],
merchantName: 'Superform',
merchantLogoUrl: 'https://cdn.example.com/logo.svg'
})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url', 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://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url",
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([
'smartAccount' => '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91',
'baseCountry' => 'US',
'baseCurrencyCode' => 'USD',
'locale' => '<string>',
'connection' => '<string>',
'acceptedExchangeFeeBps' => 5000,
'connections' => [
'coinbase',
'kraken'
],
'merchantName' => 'Superform',
'merchantLogoUrl' => 'https://cdn.example.com/logo.svg'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url"
payload := strings.NewReader("{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\",\n \"acceptedExchangeFeeBps\": 5000,\n \"connections\": [\n \"coinbase\",\n \"kraken\"\n ],\n \"merchantName\": \"Superform\",\n \"merchantLogoUrl\": \"https://cdn.example.com/logo.svg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\",\n \"acceptedExchangeFeeBps\": 5000,\n \"connections\": [\n \"coinbase\",\n \"kraken\"\n ],\n \"merchantName\": \"Superform\",\n \"merchantLogoUrl\": \"https://cdn.example.com/logo.svg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\",\n \"acceptedExchangeFeeBps\": 5000,\n \"connections\": [\n \"coinbase\",\n \"kraken\"\n ],\n \"merchantName\": \"Superform\",\n \"merchantLogoUrl\": \"https://cdn.example.com/logo.svg\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"url": "<string>",
"currencyCode": "<string>",
"sandbox": true,
"externalCustomerId": "<string>",
"expiresAt": "<string>",
"exchangeFeeBps": 1
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"exchangeFeeBps": 5000
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Create an exchange funding URL
Creates a signed Swapped Connect URL for funding from a centralized exchange.
curl --request POST \
--url https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '
{
"smartAccount": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91",
"baseCountry": "US",
"baseCurrencyCode": "USD",
"locale": "<string>",
"connection": "<string>",
"acceptedExchangeFeeBps": 5000,
"connections": [
"coinbase",
"kraken"
],
"merchantName": "Superform",
"merchantLogoUrl": "https://cdn.example.com/logo.svg"
}
'import requests
url = "https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url"
payload = {
"smartAccount": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91",
"baseCountry": "US",
"baseCurrencyCode": "USD",
"locale": "<string>",
"connection": "<string>",
"acceptedExchangeFeeBps": 5000,
"connections": ["coinbase", "kraken"],
"merchantName": "Superform",
"merchantLogoUrl": "https://cdn.example.com/logo.svg"
}
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
smartAccount: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91',
baseCountry: 'US',
baseCurrencyCode: 'USD',
locale: '<string>',
connection: '<string>',
acceptedExchangeFeeBps: 5000,
connections: ['coinbase', 'kraken'],
merchantName: 'Superform',
merchantLogoUrl: 'https://cdn.example.com/logo.svg'
})
};
fetch('https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url', 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://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url",
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([
'smartAccount' => '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91',
'baseCountry' => 'US',
'baseCurrencyCode' => 'USD',
'locale' => '<string>',
'connection' => '<string>',
'acceptedExchangeFeeBps' => 5000,
'connections' => [
'coinbase',
'kraken'
],
'merchantName' => 'Superform',
'merchantLogoUrl' => 'https://cdn.example.com/logo.svg'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-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://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url"
payload := strings.NewReader("{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\",\n \"acceptedExchangeFeeBps\": 5000,\n \"connections\": [\n \"coinbase\",\n \"kraken\"\n ],\n \"merchantName\": \"Superform\",\n \"merchantLogoUrl\": \"https://cdn.example.com/logo.svg\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-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://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\",\n \"acceptedExchangeFeeBps\": 5000,\n \"connections\": [\n \"coinbase\",\n \"kraken\"\n ],\n \"merchantName\": \"Superform\",\n \"merchantLogoUrl\": \"https://cdn.example.com/logo.svg\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\",\n \"acceptedExchangeFeeBps\": 5000,\n \"connections\": [\n \"coinbase\",\n \"kraken\"\n ],\n \"merchantName\": \"Superform\",\n \"merchantLogoUrl\": \"https://cdn.example.com/logo.svg\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"url": "<string>",
"currencyCode": "<string>",
"sandbox": true,
"externalCustomerId": "<string>",
"expiresAt": "<string>",
"exchangeFeeBps": 1
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"exchangeFeeBps": 5000
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}Headers
API key for authentication
"your-api-key"
Trusted edge-resolved ISO country. When present it overrides body.baseCountry and x-client-ip, and enables country-specific payment-method validation.
^[A-Z]{2}$"PH"
The end user's IP address as observed by the edge, for edges that can name the IP but cannot resolve a country themselves (no local GeoIP database). Used only when x-user-country is absent, and ignored unless it is a publicly-routable address. Prefer x-user-country when your edge already has a country — for example Cloudflare's cf-ipcountry — since it needs no lookup here.
"203.0.113.7"
Body
Ethereum address (0x followed by 40 hex characters)
^0x[a-fA-F0-9]{40}$"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"
ISO-3166-1 alpha-2 country code
^[A-Z]{2}$"US"
ISO fiat currency code
^[A-Z]{3,4}$"USD"
0 <= x <= 100001 - 26 elements1 - 64["coinbase", "kraken"]
Optional. Overrides the merchant name Swapped Connect shows on its confirm screen — both the "To:" row and its tooltip ("Funds will be delivered to your wallet."). Omit it to inherit the Rhinestone default. Send it raw; the service URL-encodes it.
64"Superform"
Optional. Publicly accessible HTTPS URL of the merchant's logo, shown beside merchantName on the Swapped Connect confirm screen. PNG or SVG recommended. Send it raw; the service URL-encodes it.
2048"https://cdn.example.com/logo.svg"
Was this page helpful?