Quote Payment
curl --request POST \
--url https://secureapi.tender.cash/v1/api/payment/quote/{id} \
--header 'Content-Type: <content-type>' \
--header 'x-access-id: <api-key>' \
--data '
{
"amount": "15000",
"chain": "tron",
"currency": "usdt"
}
'const options = {
method: 'POST',
headers: {'x-access-id': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({amount: '15000', chain: 'tron', currency: 'usdt'})
};
fetch('https://secureapi.tender.cash/v1/api/payment/quote/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://secureapi.tender.cash/v1/api/payment/quote/{id}"
payload = {
"amount": "15000",
"chain": "tron",
"currency": "usdt"
}
headers = {
"x-access-id": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://secureapi.tender.cash/v1/api/payment/quote/{id}",
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([
'amount' => '15000',
'chain' => 'tron',
'currency' => 'usdt'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-access-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "success",
"data": {
"coin": "usdt",
"symbol": "USDT",
"chain": "tron",
"currency": "ngn",
"rate": 1500,
"usdRate": 1,
"coinAmount": 10,
"fee": 0.15,
"feeUSD": 0.15,
"totalPayable": 10.15,
"totalPayableUSD": 10.15
}
}{
"status": "error",
"message": "Minimum initiated amount is 5 USD",
"data": null
}{
"status": "error",
"message": "INVALID_REQUEST_SIGNATURE",
"data": {}
}{
"status": "error",
"message": "You are not authorized to initiate transactions with this currency",
"data": null
}{
"status": "error",
"message": "Too many requests. Max 120 per 60s.",
"data": null
}Payment
Quote Payment
Get the all-in amount a customer would pay, without creating a payment
POST
/
v1
/
api
/
payment
/
quote
/
{id}
Quote Payment
curl --request POST \
--url https://secureapi.tender.cash/v1/api/payment/quote/{id} \
--header 'Content-Type: <content-type>' \
--header 'x-access-id: <api-key>' \
--data '
{
"amount": "15000",
"chain": "tron",
"currency": "usdt"
}
'const options = {
method: 'POST',
headers: {'x-access-id': '<api-key>', 'Content-Type': '<content-type>'},
body: JSON.stringify({amount: '15000', chain: 'tron', currency: 'usdt'})
};
fetch('https://secureapi.tender.cash/v1/api/payment/quote/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://secureapi.tender.cash/v1/api/payment/quote/{id}"
payload = {
"amount": "15000",
"chain": "tron",
"currency": "usdt"
}
headers = {
"x-access-id": "<api-key>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://secureapi.tender.cash/v1/api/payment/quote/{id}",
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([
'amount' => '15000',
'chain' => 'tron',
'currency' => 'usdt'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-access-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "success",
"message": "success",
"data": {
"coin": "usdt",
"symbol": "USDT",
"chain": "tron",
"currency": "ngn",
"rate": 1500,
"usdRate": 1,
"coinAmount": 10,
"fee": 0.15,
"feeUSD": 0.15,
"totalPayable": 10.15,
"totalPayableUSD": 10.15
}
}{
"status": "error",
"message": "Minimum initiated amount is 5 USD",
"data": null
}{
"status": "error",
"message": "INVALID_REQUEST_SIGNATURE",
"data": {}
}{
"status": "error",
"message": "You are not authorized to initiate transactions with this currency",
"data": null
}{
"status": "error",
"message": "Too many requests. Max 120 per 60s.",
"data": null
}Auth method: Basic (Access ID) — this endpoint only requires your
x-access-id header. No request signing is needed. See
Authentication.totalPayable is the same all-in figure that initiation returns as amount/coinAmount: the
payment plus the receive fee, any activation fee, any auto-payout fees and, on Tron, the gasless
network service fee. Prices can move between the quote and initiation, so the initiated amount can
differ slightly if time passes.
The same checks apply as on initiation, including the minimum amount and your outlet’s allowed
currencies. Payment endpoints share a limit of 120 requests per minute. See
Rate limits.
Path Parameters
string
required
Fiat currency code that
amount is priced in, such as ngn or usd. Use a fiat currency
listed by Fetch All Currencies with type=fiat.Example: "ngn"Headers
string
required
Your API access ID provided by TenderExample:
"your-access-id-here"string
required
Media type of the request bodyExample:
"application/json"Body
string
required
The price to charge, in the fiat currency named in the path, as a decimal stringExample:
"15000"string
required
Chain identifier, as returned by Fetch Allowed ChainsExample:
"tron"string
required
Cryptocurrency identifier. Must be supported on
chain and allowed for your outlet.Example: "usdt"Response
string
required
Status of the API requestExample:
"success"string
required
Human-readable message describing the resultExample:
"success"object
required
The quote
Show data properties
Show data properties
string
Cryptocurrency identifierExample:
"usdt"string
Cryptocurrency symbolExample:
"USDT"string
Chain identifierExample:
"tron"string
The fiat currency the quote is priced inExample:
"ngn"number
Price of one unit of the cryptocurrency in
currencyExample: 1500number
Price of one unit of the cryptocurrency in USDExample:
1number
The payment itself in the cryptocurrency, before feesExample:
10number
Every fee the customer covers, combined, in the cryptocurrencyExample:
0.15number
fee in USDExample: 0.15number
The all-in cryptocurrency amount the customer would send (
coinAmount + fee)Example: 10.15number
totalPayable in USDExample: 10.15Errors
| HTTP | Message | Cause |
|---|---|---|
| 400 | amount must be a string (or another validation message) | A required field is missing or has the wrong type |
| 400 | Invalid chain / Chain not active | Unknown or disabled chain |
| 400 | invalid Currency / Currency not allowed | Unknown currency, or not supported on chain |
| 400 | Amount can't be Zero | amount is zero or negative |
| 400 | Minimum initiated amount is <n> USD | The payment is below the minimum |
| 400 | Invalid Coin Exchange Price | No price is available for the currency right now |
| 403 | You are not authorized to initiate transactions with this currency | The currency isn’t in your outlet’s allowed currencies |
data: null. See Errors.
Example request
curl -X POST https://sandbox-api.tender.cash/v1/api/payment/quote/ngn \
-H "x-access-id: your-access-id-here" \
-H "Content-Type: application/json" \
-d '{ "amount": "15000", "chain": "tron", "currency": "usdt" }'
Example response
{
"status": "success",
"message": "success",
"data": {
"coin": "usdt",
"symbol": "USDT",
"chain": "tron",
"currency": "ngn",
"rate": 1500,
"usdRate": 1,
"coinAmount": 10,
"fee": 0.15,
"feeUSD": 0.15,
"totalPayable": 10.15,
"totalPayableUSD": 10.15
}
}
Authorizations
Basic (Access ID) authentication. Only the x-access-id header is required; no request signing.
Headers
Your API access ID provided by Tender
Media type of the request body
Path Parameters
Fiat currency code that amount is priced in (e.g. ngn, usd)
Body
application/json