Skip to main content
POST
/
onramp
/
swapped
/
connect-url
Mint a signed Swapped Connect URL (CEX funding)
curl --request POST \
  --url https://v1.orchestrator.rhinestone.dev/deposit-processor/onramp/swapped/connect-url \
  --header 'Content-Type: application/json' \
  --data '
{
  "smartAccount": "0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91",
  "baseCountry": "US",
  "baseCurrencyCode": "USD",
  "locale": "<string>",
  "connection": "<string>"
}
'
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>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
smartAccount: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91',
baseCountry: 'US',
baseCurrencyCode: 'USD',
locale: '<string>',
connection: '<string>'
})
};

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>'
]),
CURLOPT_HTTPHEADER => [
"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://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}")

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

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("Content-Type", "application/json")
.body("{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\"\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["Content-Type"] = 'application/json'
request.body = "{\n \"smartAccount\": \"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91\",\n \"baseCountry\": \"US\",\n \"baseCurrencyCode\": \"USD\",\n \"locale\": \"<string>\",\n \"connection\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "ok": true,
  "url": "<string>",
  "currencyCode": "<string>",
  "sandbox": true,
  "externalCustomerId": "<string>",
  "expiresAt": "<string>"
}
{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}
{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}
{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}
{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}
{
"error": "<string>",
"details": [
{
"message": "<string>",
"path": [
"<string>"
],
"code": "<string>"
}
]
}

Headers

x-api-key
string

API key for authentication (omit when sending Authorization)

Example:

"your-api-key"

authorization
string

Bearer platform token (e.g. forwarded by user-service). Takes precedence over x-api-key when both are present.

Example:

"Bearer eyJhbGciOi..."

Body

application/json
smartAccount
string
required

Ethereum address (0x followed by 40 hex characters)

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f5bE91"

baseCountry
string

ISO-3166-1 alpha-2 country code

Pattern: ^[A-Z]{2}$
Example:

"US"

baseCurrencyCode
string

ISO fiat currency code

Pattern: ^[A-Z]{3,4}$
Example:

"USD"

locale
string
connection
string

Response

Signed Connect URL

ok
enum<boolean>
required
Available options:
true
url
string
required
currencyCode
string
required
sandbox
boolean
required
externalCustomerId
string
required
expiresAt
string
required