Get current exchange rates
curl --request GET \
--url https://api.wizzgift.com/retailer/v1/rates \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizzgift.com/retailer/v1/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wizzgift.com/retailer/v1/rates"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizzgift.com/retailer/v1/rates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"base": "USD",
"rates": {
"BTC": 0.0000153,
"EUR": 0.92,
"GBP": 0.79,
"INR": 83.2,
"USD": 1,
"USDT": 1.0001
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "FORBIDDEN",
"message": "Retailer API access is disabled for this account"
},
"requestId": "req_8f3k2"
}{
"error": "Too many requests",
"message": "<string>"
}{
"error": {
"code": "EXTERNAL_SERVICE_ERROR",
"message": "Exchange rates not available"
},
"requestId": "req_8f3k2"
}Retailer · Catalog
Get current exchange rates
Live rates for every currency Wizzgift prices in, quoted as units of
that currency per 1 USD (USD itself is 1). Use them to show
catalog prices, which are in each product’s costCurrency, in your
end-customer’s currency before a checkout exists.
Convert between any two currencies through USD:
amountInTo = amountInFrom / rates[from] * rates[to]
Rates are indicative. Crypto rates refresh about every 10 minutes,
fiat rates about every 30. A checkout freezes the rates current at its
creation, so the checkout’s totalAmount in its paymentCurrency is
the price your customer pays. Identical payload to GET /b2b/rates.
GET
/
retailer
/
v1
/
rates
Get current exchange rates
curl --request GET \
--url https://api.wizzgift.com/retailer/v1/rates \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizzgift.com/retailer/v1/rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wizzgift.com/retailer/v1/rates"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizzgift.com/retailer/v1/rates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"base": "USD",
"rates": {
"BTC": 0.0000153,
"EUR": 0.92,
"GBP": 0.79,
"INR": 83.2,
"USD": 1,
"USDT": 1.0001
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired API key"
},
"requestId": "req_8f3k2"
}{
"error": {
"code": "FORBIDDEN",
"message": "Retailer API access is disabled for this account"
},
"requestId": "req_8f3k2"
}{
"error": "Too many requests",
"message": "<string>"
}{
"error": {
"code": "EXTERNAL_SERVICE_ERROR",
"message": "Exchange rates not available"
},
"requestId": "req_8f3k2"
}Authorizations
API key (wg_live_…) created in the dashboard (Account → API Keys).
Shown once at creation; only a hash is stored server-side.