Convert an amount between currencies
curl --request GET \
--url https://api.wizzgift.com/retailer/v1/rates/convert \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizzgift.com/retailer/v1/rates/convert', 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/convert"
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/convert",
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;
}{
"from": "EUR",
"to": "USD",
"amount": 50,
"converted": 54.35,
"rate": 1.087
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "No exchange rate available for XYZ"
},
"requestId": "req_8f3k2"
}{
"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
Convert an amount between currencies
Converts with the same live rates as GET /retailer/v1/rates.
converted is unrounded and indicative — the checkout you create
prices with the rates current at that moment. Identical to
GET /b2b/rates/convert.
GET
/
retailer
/
v1
/
rates
/
convert
Convert an amount between currencies
curl --request GET \
--url https://api.wizzgift.com/retailer/v1/rates/convert \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.wizzgift.com/retailer/v1/rates/convert', 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/convert"
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/convert",
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;
}{
"from": "EUR",
"to": "USD",
"amount": 50,
"converted": 54.35,
"rate": 1.087
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "No exchange rate available for XYZ"
},
"requestId": "req_8f3k2"
}{
"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.
Query Parameters
Currency code to convert from (case-insensitive). Any key of GET …/rates.
Example:
"EUR"
Currency code to convert to (case-insensitive). Any key of GET …/rates.
Example:
"USD"
Amount in from to convert.
Example:
50