curl --request POST \
--url https://api.bitgpt.xyz/pay/quote \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"product": {
"id": "product_123",
"quantity": 2,
"billing_schema_id": "schema_456"
}
}
'import requests
url = "https://api.bitgpt.xyz/pay/quote"
payload = {
"currency": "USD",
"product": {
"id": "product_123",
"quantity": 2,
"billing_schema_id": "schema_456"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'USD',
product: {id: 'product_123', quantity: 2, billing_schema_id: 'schema_456'}
})
};
fetch('https://api.bitgpt.xyz/pay/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.bitgpt.xyz/pay/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([
'currency' => 'USD',
'product' => [
'id' => 'product_123',
'quantity' => 2,
'billing_schema_id' => 'schema_456'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.bitgpt.xyz/pay/quote"
payload := strings.NewReader("{\n \"currency\": \"USD\",\n \"product\": {\n \"id\": \"product_123\",\n \"quantity\": 2,\n \"billing_schema_id\": \"schema_456\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.bitgpt.xyz/pay/quote")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"product\": {\n \"id\": \"product_123\",\n \"quantity\": 2,\n \"billing_schema_id\": \"schema_456\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitgpt.xyz/pay/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"USD\",\n \"product\": {\n \"id\": \"product_123\",\n \"quantity\": 2,\n \"billing_schema_id\": \"schema_456\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"currency": "EUR",
"exchange_rate_timestamp": "2025-07-17 14:10:54",
"total": {
"currency": "EUR",
"price": "32.951697216289163687202823978002",
"price_usd": "37.466313000185518054389028083023"
},
"items": [
{
"item": {
"type": "PRODUCT",
"product_id": "product_019814e9-b117-7e35-aa51-4ff1f9d1948f",
"quantity": 1,
"billing_schema_id": "schema_019814e9-b119-780c-9f69-7bb0e6bf9886",
"currency": "GBP"
},
"calculations": [
{
"idx": 0,
"currency": "GBP",
"calculation_type": "PRODUCT",
"title": "Product GBP 10$",
"initial_price": "10.000000000000000000000000000000",
"price": "10.000000000000000000000000000000",
"price_delta": "0",
"initial_price_orig": "10.000000000000000000000000000000",
"price_orig": "10.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "13.535499554682065493724914679486",
"price_usd": "13.535499554682065493724914679486",
"price_delta_usd": "0",
"details": {
"product_id": "product_019814e9-b117-7e35-aa51-4ff1f9d1948f",
"currency": "GBP",
"price": "10.000000000000000000000000000000",
"quantity": 1
}
},
{
"idx": 1,
"currency": "EUR",
"calculation_type": "CURRENCY_CHANGE",
"title": "Currency change GBP => EUR",
"initial_price": "10.000000000000000000000000000000",
"price": "11.904498929341986033539547683847",
"price_delta": "0",
"initial_price_orig": "10.000000000000000000000000000000",
"price_orig": "10.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "13.535499554682065493724914679486",
"price_usd": "13.535499554682065493724914679486",
"price_delta_usd": "0",
"details": {
"from": "GBP",
"to": "EUR",
"from_rate_usd": "0.738797999999999954",
"to_rate_usd": "0.879502000000000005"
}
}
],
"total": {
"currency": "EUR",
"currency_original": "GBP",
"price": "11.904498929341986033539547683847",
"price_usd": "13.535499554682065493724914679486",
"price_orig": "10.000000000000000000000000000000"
}
},
{
"item": {
"type": "PRODUCT",
"product_id": "product_01979cc2-6b9a-7cbf-9dbf-fa7dba4f0e50",
"quantity": 4,
"billing_schema_id": "schema_01979cc2-6b9c-7062-80ca-97ddcd00fd29",
"currency": "GBP"
},
"calculations": [
{
"idx": 0,
"currency": "GBP",
"calculation_type": "PRODUCT",
"title": "ONE_TIME PRODUCT",
"initial_price": "16.000000000000000000000000000000",
"price": "16.000000000000000000000000000000",
"price_delta": "0",
"initial_price_orig": "16.000000000000000000000000000000",
"price_orig": "16.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "21.656799287491304789959863487177",
"price_usd": "21.656799287491304789959863487177",
"price_delta_usd": "0",
"details": {
"product_id": "product_01979cc2-6b9a-7cbf-9dbf-fa7dba4f0e50",
"currency": "GBP",
"price": "4.000000000000000000000000000000",
"quantity": 4
}
},
{
"idx": 1,
"currency": "EUR",
"calculation_type": "CURRENCY_CHANGE",
"title": "Currency change GBP => EUR",
"initial_price": "16.000000000000000000000000000000",
"price": "19.047198286947177653663276294155",
"price_delta": "0",
"initial_price_orig": "16.000000000000000000000000000000",
"price_orig": "16.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "21.656799287491304789959863487177",
"price_usd": "21.656799287491304789959863487177",
"price_delta_usd": "0",
"details": {
"from": "GBP",
"to": "EUR",
"from_rate_usd": "0.738797999999999954",
"to_rate_usd": "0.879502000000000005"
}
}
],
"total": {
"currency": "EUR",
"currency_original": "GBP",
"price": "19.047198286947177653663276294155",
"price_usd": "21.656799287491304789959863487177",
"price_orig": "16.000000000000000000000000000000"
}
},
{
"item": {
"type": "PAYMENT_INTENT",
"price": "2",
"currency": "EUR"
},
"calculations": [
{
"idx": 0,
"currency": "EUR",
"calculation_type": "PAYMENT_INTENT",
"title": "Payment Intent: N/A",
"initial_price": "2.000000000000000000000000000000",
"price": "2.000000000000000000000000000000",
"price_delta": "0",
"initial_price_orig": "2.000000000000000000000000000000",
"price_orig": "2.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "2.274014158012147770704249916360",
"price_usd": "2.274014158012147770704249916360",
"price_delta_usd": "0",
"details": {
"payment_intent_id": null,
"currency": "EUR",
"price": "2",
"quantity": 1
}
}
],
"total": {
"currency": "EUR",
"currency_original": "EUR",
"price": "2.000000000000000000000000000000",
"price_usd": "2.274014158012147770704249916360",
"price_orig": "2.000000000000000000000000000000"
}
},
{
"item": {
"type": "TOTAL",
"currency": "EUR",
"status": "INCLUDED"
},
"calculations": [
{
"idx": 0,
"currency": "EUR",
"calculation_type": "TOTAL",
"title": "Total",
"initial_price": "32.951697216289163687202823978002",
"price": "32.951697216289163687202823978002",
"price_delta": "0",
"initial_price_orig": null,
"price_orig": null,
"price_delta_orig": "0",
"initial_price_usd": "37.466313000185518054389028083023",
"price_usd": "37.466313000185518054389028083023",
"price_delta_usd": "0",
"details": []
}
]
},
{
"item": {
"type": "TOTAL_USD",
"currency": "USD",
"status": "INCLUDED"
},
"calculations": [
{
"idx": 0,
"currency": "USD",
"calculation_type": "TOTAL_USD",
"title": "Total, USD",
"initial_price": "37.466313000185518054389028083023",
"price": "37.466313000185518054389028083023",
"price_delta": "0",
"details": []
}
]
}
]
},
"error": null,
"log": null,
"validator": null,
"support_id": null,
"message": "Resource created successfully",
"env": "development"
}{
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 401,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 403,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}Quote payment
Calculate pricing quote for products, invoices, or custom items with currency conversion support
curl --request POST \
--url https://api.bitgpt.xyz/pay/quote \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "USD",
"product": {
"id": "product_123",
"quantity": 2,
"billing_schema_id": "schema_456"
}
}
'import requests
url = "https://api.bitgpt.xyz/pay/quote"
payload = {
"currency": "USD",
"product": {
"id": "product_123",
"quantity": 2,
"billing_schema_id": "schema_456"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'USD',
product: {id: 'product_123', quantity: 2, billing_schema_id: 'schema_456'}
})
};
fetch('https://api.bitgpt.xyz/pay/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.bitgpt.xyz/pay/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([
'currency' => 'USD',
'product' => [
'id' => 'product_123',
'quantity' => 2,
'billing_schema_id' => 'schema_456'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.bitgpt.xyz/pay/quote"
payload := strings.NewReader("{\n \"currency\": \"USD\",\n \"product\": {\n \"id\": \"product_123\",\n \"quantity\": 2,\n \"billing_schema_id\": \"schema_456\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.bitgpt.xyz/pay/quote")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"USD\",\n \"product\": {\n \"id\": \"product_123\",\n \"quantity\": 2,\n \"billing_schema_id\": \"schema_456\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitgpt.xyz/pay/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"USD\",\n \"product\": {\n \"id\": \"product_123\",\n \"quantity\": 2,\n \"billing_schema_id\": \"schema_456\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"data": {
"currency": "EUR",
"exchange_rate_timestamp": "2025-07-17 14:10:54",
"total": {
"currency": "EUR",
"price": "32.951697216289163687202823978002",
"price_usd": "37.466313000185518054389028083023"
},
"items": [
{
"item": {
"type": "PRODUCT",
"product_id": "product_019814e9-b117-7e35-aa51-4ff1f9d1948f",
"quantity": 1,
"billing_schema_id": "schema_019814e9-b119-780c-9f69-7bb0e6bf9886",
"currency": "GBP"
},
"calculations": [
{
"idx": 0,
"currency": "GBP",
"calculation_type": "PRODUCT",
"title": "Product GBP 10$",
"initial_price": "10.000000000000000000000000000000",
"price": "10.000000000000000000000000000000",
"price_delta": "0",
"initial_price_orig": "10.000000000000000000000000000000",
"price_orig": "10.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "13.535499554682065493724914679486",
"price_usd": "13.535499554682065493724914679486",
"price_delta_usd": "0",
"details": {
"product_id": "product_019814e9-b117-7e35-aa51-4ff1f9d1948f",
"currency": "GBP",
"price": "10.000000000000000000000000000000",
"quantity": 1
}
},
{
"idx": 1,
"currency": "EUR",
"calculation_type": "CURRENCY_CHANGE",
"title": "Currency change GBP => EUR",
"initial_price": "10.000000000000000000000000000000",
"price": "11.904498929341986033539547683847",
"price_delta": "0",
"initial_price_orig": "10.000000000000000000000000000000",
"price_orig": "10.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "13.535499554682065493724914679486",
"price_usd": "13.535499554682065493724914679486",
"price_delta_usd": "0",
"details": {
"from": "GBP",
"to": "EUR",
"from_rate_usd": "0.738797999999999954",
"to_rate_usd": "0.879502000000000005"
}
}
],
"total": {
"currency": "EUR",
"currency_original": "GBP",
"price": "11.904498929341986033539547683847",
"price_usd": "13.535499554682065493724914679486",
"price_orig": "10.000000000000000000000000000000"
}
},
{
"item": {
"type": "PRODUCT",
"product_id": "product_01979cc2-6b9a-7cbf-9dbf-fa7dba4f0e50",
"quantity": 4,
"billing_schema_id": "schema_01979cc2-6b9c-7062-80ca-97ddcd00fd29",
"currency": "GBP"
},
"calculations": [
{
"idx": 0,
"currency": "GBP",
"calculation_type": "PRODUCT",
"title": "ONE_TIME PRODUCT",
"initial_price": "16.000000000000000000000000000000",
"price": "16.000000000000000000000000000000",
"price_delta": "0",
"initial_price_orig": "16.000000000000000000000000000000",
"price_orig": "16.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "21.656799287491304789959863487177",
"price_usd": "21.656799287491304789959863487177",
"price_delta_usd": "0",
"details": {
"product_id": "product_01979cc2-6b9a-7cbf-9dbf-fa7dba4f0e50",
"currency": "GBP",
"price": "4.000000000000000000000000000000",
"quantity": 4
}
},
{
"idx": 1,
"currency": "EUR",
"calculation_type": "CURRENCY_CHANGE",
"title": "Currency change GBP => EUR",
"initial_price": "16.000000000000000000000000000000",
"price": "19.047198286947177653663276294155",
"price_delta": "0",
"initial_price_orig": "16.000000000000000000000000000000",
"price_orig": "16.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "21.656799287491304789959863487177",
"price_usd": "21.656799287491304789959863487177",
"price_delta_usd": "0",
"details": {
"from": "GBP",
"to": "EUR",
"from_rate_usd": "0.738797999999999954",
"to_rate_usd": "0.879502000000000005"
}
}
],
"total": {
"currency": "EUR",
"currency_original": "GBP",
"price": "19.047198286947177653663276294155",
"price_usd": "21.656799287491304789959863487177",
"price_orig": "16.000000000000000000000000000000"
}
},
{
"item": {
"type": "PAYMENT_INTENT",
"price": "2",
"currency": "EUR"
},
"calculations": [
{
"idx": 0,
"currency": "EUR",
"calculation_type": "PAYMENT_INTENT",
"title": "Payment Intent: N/A",
"initial_price": "2.000000000000000000000000000000",
"price": "2.000000000000000000000000000000",
"price_delta": "0",
"initial_price_orig": "2.000000000000000000000000000000",
"price_orig": "2.000000000000000000000000000000",
"price_delta_orig": "0",
"initial_price_usd": "2.274014158012147770704249916360",
"price_usd": "2.274014158012147770704249916360",
"price_delta_usd": "0",
"details": {
"payment_intent_id": null,
"currency": "EUR",
"price": "2",
"quantity": 1
}
}
],
"total": {
"currency": "EUR",
"currency_original": "EUR",
"price": "2.000000000000000000000000000000",
"price_usd": "2.274014158012147770704249916360",
"price_orig": "2.000000000000000000000000000000"
}
},
{
"item": {
"type": "TOTAL",
"currency": "EUR",
"status": "INCLUDED"
},
"calculations": [
{
"idx": 0,
"currency": "EUR",
"calculation_type": "TOTAL",
"title": "Total",
"initial_price": "32.951697216289163687202823978002",
"price": "32.951697216289163687202823978002",
"price_delta": "0",
"initial_price_orig": null,
"price_orig": null,
"price_delta_orig": "0",
"initial_price_usd": "37.466313000185518054389028083023",
"price_usd": "37.466313000185518054389028083023",
"price_delta_usd": "0",
"details": []
}
]
},
{
"item": {
"type": "TOTAL_USD",
"currency": "USD",
"status": "INCLUDED"
},
"calculations": [
{
"idx": 0,
"currency": "USD",
"calculation_type": "TOTAL_USD",
"title": "Total, USD",
"initial_price": "37.466313000185518054389028083023",
"price": "37.466313000185518054389028083023",
"price_delta": "0",
"details": []
}
]
}
]
},
"error": null,
"log": null,
"validator": null,
"support_id": null,
"message": "Resource created successfully",
"env": "development"
}{
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 401,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}{
"status": 403,
"error": "<string>",
"message": null,
"log": "<string>",
"validator": {},
"support_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"data": {}
}Authorizations
Send your access token as header Authorization: Bearer {accessToken}
Your API key that starts with sk_live or sk_test. You can create yours at go.bitgpt.xyz/api-keys.
Body
- Option 1
- Option 2
- Option 3
Product calculation request
Product calculation request
- Option 1
- Option 2
Show child attributes
Show child attributes
Main currency for calculation (optional, can be determined from product)
BITCOIN, ETHEREUM, USDT, USDC, USDC_NATIVE, SOLANA, BINANCE_COIN, RIPPLE, POLYGON, TRON, LITECOIN, BITCOIN_CASH, DOGECOIN, USD, EUR, CHF, GBP, AUD, JPY, CNY, CAD, HKD, SGD, SEK, KRW, NOK, NZD, INR, MXN, TWD, ZAR, BRL, DKK, PLN, THB, ILS, IDR, CZK, AED, TRY, HUF, CLP, SAR, PHP, MYR, COP, RUB, RON, PEN "GBP"
"BITCOIN"
Response
Quote calculated successfully
Calculator quote response
Status code of the response
200, 201, 202 Calculation result data
Show child attributes
Show child attributes
Message of the response, human readable
"Resource created successfully"
API environment
development, production Error message of the response, human readable
"Invalid email address"
Useful informaiton, not always present, to debug the response
{ "request_id": "req_1234567890" }
"Some pertinent log message"
Validator response object, each key is the field name and value is the error message
{
"email": "Invalid email address",
"password": "Password is required"
}
Support ID linked to the response, used to identify it when talking with our team
"support_uuidv7-something-else"

