curl --request POST \
--url https://api.rheon.io/v1/card/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiatCurrency": "EUR",
"fiatAmount": "100"
}
'import requests
url = "https://api.rheon.io/v1/card/quote"
payload = {
"fiatCurrency": "EUR",
"fiatAmount": "100"
}
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({fiatCurrency: 'EUR', fiatAmount: '100'})
};
fetch('https://api.rheon.io/v1/card/quote', 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.rheon.io/v1/card/quote",
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([
'fiatCurrency' => 'EUR',
'fiatAmount' => '100'
]),
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://api.rheon.io/v1/card/quote"
payload := strings.NewReader("{\n \"fiatCurrency\": \"EUR\",\n \"fiatAmount\": \"100\"\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://api.rheon.io/v1/card/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiatCurrency\": \"EUR\",\n \"fiatAmount\": \"100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rheon.io/v1/card/quote")
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 \"fiatCurrency\": \"EUR\",\n \"fiatAmount\": \"100\"\n}"
response = http.request(request)
puts response.read_body{
"environment": "sandbox",
"cryptoAmount": "94.812345",
"cryptoCurrency": "USDC",
"fiatAmount": "100",
"rate": "<string>",
"providerFee": "<string>",
"ourFee": "<string>",
"total": "<string>",
"expiresAt": "<string>"
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}Display quote for a card purchase
Anonymous rate: fiat in, the configured settlement asset out. The corridor (asset and chain) is fixed per deployment; the binding price is re-fetched when the purchase is created.
curl --request POST \
--url https://api.rheon.io/v1/card/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fiatCurrency": "EUR",
"fiatAmount": "100"
}
'import requests
url = "https://api.rheon.io/v1/card/quote"
payload = {
"fiatCurrency": "EUR",
"fiatAmount": "100"
}
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({fiatCurrency: 'EUR', fiatAmount: '100'})
};
fetch('https://api.rheon.io/v1/card/quote', 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.rheon.io/v1/card/quote",
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([
'fiatCurrency' => 'EUR',
'fiatAmount' => '100'
]),
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://api.rheon.io/v1/card/quote"
payload := strings.NewReader("{\n \"fiatCurrency\": \"EUR\",\n \"fiatAmount\": \"100\"\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://api.rheon.io/v1/card/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fiatCurrency\": \"EUR\",\n \"fiatAmount\": \"100\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rheon.io/v1/card/quote")
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 \"fiatCurrency\": \"EUR\",\n \"fiatAmount\": \"100\"\n}"
response = http.request(request)
puts response.read_body{
"environment": "sandbox",
"cryptoAmount": "94.812345",
"cryptoCurrency": "USDC",
"fiatAmount": "100",
"rate": "<string>",
"providerFee": "<string>",
"ourFee": "<string>",
"total": "<string>",
"expiresAt": "<string>"
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}{
"environment": "sandbox",
"error": {
"code": "invalid_request",
"message": "amount must be a decimal string of the token's smallest unit.",
"fields": {
"applicantInfo.nationality": "iso3166_1_alpha2"
}
}
}completed (it stops at processing), the settlement asset is the sandbox’s, not production’s (read cryptoCurrency from GET /v1/config), and the EUR window is unpublished (GET /v1/card/limits says window: unpublished). Every response says which environment answered in its environment field.Authorizations
Your API key, issued by us and shown once at creation.
Body
Anonymous: no email, no identity. The asset and chain are the deployment's fixed corridor, so there is nothing to name here.
ISO 4217 code to charge in. Must be one of the deployment's supported fiat currencies (see GET /v1/card/currencies); others are refused.
^[A-Za-z]{3}$"EUR"
Fiat to spend, decimal string in major units, greater than zero.
^\d+(\.\d+)?$"100"
Response
The display quote.
Display-only quote from the anonymous rate.
Which environment answered. sandbox: at least one money upstream is the provider's sandbox - no real money moves there, and the card corridor is the sandbox's asset (read GET /v1/config), not the documented production one. production: every configured upstream is real. Derived from the configured upstream hosts at boot, never a flag.
sandbox, production "sandbox"
Crypto the user receives, decimal string in major units.
"94.812345"
Which asset cryptoAmount is denominated in - the configured corridor's asset. Always read it next to the number.
"USDC"
Fiat the user spends.
"100"
Exchange rate, decimal string.
The provider's fee, in fiat.
Rheon's markup, in fiat ("0" until set).
Total charged in fiat, fees included.
ISO 8601 expiry of the displayed rate, when the provider gives one.