curl https://api.zbdpay.com/api/v1/currencies/GEMS \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Currency retrieved.",
"data": {
"currency": "GEMS",
"type": "virtual",
"name": "Gems",
"precision": 2,
"convertible": true,
"icon_url": "https://cdn.zbdpay.com/virtual-currencies/gems.png",
"project_ids": ["prj_1", "prj_2"]
},
"error": null
}
Currencies
Get a Currency
Read one currency by its code.
GET
/
api
/
v1
/
currencies
/
{currency}
curl https://api.zbdpay.com/api/v1/currencies/GEMS \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Currency retrieved.",
"data": {
"currency": "GEMS",
"type": "virtual",
"name": "Gems",
"precision": 2,
"convertible": true,
"icon_url": "https://cdn.zbdpay.com/virtual-currencies/gems.png",
"project_ids": ["prj_1", "prj_2"]
},
"error": null
}
Configuration
Header Parameters
Path Parameters
curl https://api.zbdpay.com/api/v1/currencies/GEMS \
-H "x-api-key: YOUR_API_KEY"
{
"success": true,
"message": "Currency retrieved.",
"data": {
"currency": "GEMS",
"type": "virtual",
"name": "Gems",
"precision": 2,
"convertible": true,
"icon_url": "https://cdn.zbdpay.com/virtual-currencies/gems.png",
"project_ids": ["prj_1", "prj_2"]
},
"error": null
}
Response
The currency is indata.
How many decimal places to show. Amounts are always whole numbers in the smallest unit, so with a precision of
2, 150 is shown as 1.50. Fiat follows its own standard, for example 2 for USD and 0 for JPY.The projects a virtual currency is linked to. A currency linked to several projects is the same currency in each of them.
Errors
| HTTP | code | When |
|---|---|---|
401 | unauthorized | The API key is missing or invalid |
404 | currency_not_found | No currency with this code in your program |
Was this page helpful?