Get Estimate
Converts a price into the amount a customer would pay in each coin — without creating an invoice. Use it to show a live “≈ 0.0009 BTC” figure on your product or cart page, build a currency calculator, or preview totals before checkout. The amount already includes the network fee, so it matches what the payment page will ask for.
POSThttps://payid19.com/api/v1/get_estimate
This is a read-only quote — nothing is stored and no payment address is reserved. When you are ready to actually take the payment, call create_invoice. Rates move with the market, so treat an estimate as indicative, not locked in.
Request parameters
public_keystringREQUIRED
Your public API key.
private_keystringREQUIRED
Your private API key.
price_amountdecimalREQUIRED
The amount to convert, in
price_currency.min
0.0001price_currencystringoptional
The currency
price_amount is given in. USD, EUR, GBP and 150+ local currencies are supported.default
USDcoinstringoptional
Limit the result to one coin. Send a bare code (
BTC) for every network of that coin, or a coin-network pair (USDT-TRC20) for a single network. If omitted, every coin you can accept is returned.Response
Returns the price you asked for, echoed back, plus a message array with one entry per coin/network. Each entry is the same shape as get_coins with an added price:
pricedecimal
The amount the customer would send in this coin, network fee included, rounded to that coin’s decimals. This is the figure the payment page would display.
name / long_name / network / icon / decimals—
The same coin fields returned by get_coins.
{
"status": "success",
"price_amount": 100,
"price_currency": "USD",
"message": [
{"name":"USDT","long_name":"USD Tether","network":"TRC20","icon":"...","decimals":2,"price":100},
{"name":"USDT","long_name":"USD Tether","network":"ERC20","icon":"...","decimals":2,"price":102},
{"name":"BTC","long_name":"Bitcoin","network":"BTC","icon":"...","decimals":6,"price":0.001671}
]
}
Notice USDT costs
100 on TRC20 but 102 on ERC20 for the same 100 USD invoice — the difference is that network’s transfer fee, which is added on top. Showing the estimate per network lets customers pick the cheapest one.Example request
# every coin
curl -X POST https://payid19.com/api/v1/get_estimate \
-d public_key=YOUR_PUBLIC_KEY \
-d private_key=YOUR_PRIVATE_KEY \
-d price_amount=100 \
-d price_currency=USD
# just one coin
curl -X POST https://payid19.com/api/v1/get_estimate \
-d public_key=YOUR_PUBLIC_KEY \
-d private_key=YOUR_PRIVATE_KEY \
-d price_amount=100 \
-d coin=BTC
<?php
$post = [
'public_key' => 'YOUR_PUBLIC_KEY',
'private_key' => 'YOUR_PRIVATE_KEY',
'price_amount' => 100,
'price_currency' => 'USD',
// 'coin' => 'BTC', // optional: one coin only
];
$ch = curl_init('https://payid19.com/api/v1/get_estimate');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$result = curl_exec($ch);
curl_close($ch);
$response = json_decode($result);
if ($response->status == 'error') {
echo is_array($response->message) ? $response->message[0] : $response->message;
} else {
foreach ($response->message as $coin) {
echo $coin->name . ' (' . $coin->network . '): ' . $coin->price . PHP_EOL;
}
}
const axios = require('axios');
axios.post('https://payid19.com/api/v1/get_estimate', {
public_key: 'YOUR_PUBLIC_KEY',
private_key: 'YOUR_PRIVATE_KEY',
price_amount: 100,
price_currency: 'USD',
// coin: 'BTC', // optional: one coin only
})
.then(({ data }) => {
if (data.status === 'error') return console.error([].concat(data.message)[0]);
data.message.forEach(c => console.log(`${c.name} (${c.network}): ${c.price}`));
})
.catch(err => console.error(err.message));
import requests
response = requests.post('https://payid19.com/api/v1/get_estimate', data={
'public_key': 'YOUR_PUBLIC_KEY',
'private_key': 'YOUR_PRIVATE_KEY',
'price_amount': 100,
'price_currency': 'USD',
# 'coin': 'BTC', # optional: one coin only
})
result = response.json()
if result['status'] == 'error':
msg = result['message']
print(msg[0] if isinstance(msg, list) else msg)
else:
for coin in result['message']:
print(f"{coin['name']} ({coin['network']}): {coin['price']}")