Supported currencies
Fetch supported currencies before you render payment options or validate user input.
1. List supported currencies
Use GET /v1/oblixcore/config/supported-currencies to fetch the fiat currencies your integration can display or accept.
Request and response
curl --location 'https://sandbox-api.aparatech.io/v1/public/config/supported-currencies?direction=deposit&userType=individual&limit=100&page=1' \
--header 'accept: application/json' \
--header 'mid: {{mid}}' \
--header 'Authorization: Basic {{token}}'
{
"success": true,
"data": [
{
"code": "USD",
"name": "US Dollar"
},
{
"code": "EUR",
"name": "Euro"
},
{
"code": "NGN",
"name": "Nigerian Naira"
}
]
}
Integration
const axios = require("axios");
async function getSupportedCurrencies() {
try {
const response = await axios.get(
"https://sandbox-api.aparatech.io/v1/public/config/supported-currencies",
{
auth: {
username: "aparaUser",
password: "aparaPass"
},
headers: {
Accept: "application/json",
"Content-Type": "application/json"
}
}
);
console.log("Supported currencies:", response.data);
} catch (error) {
if (error.response) {
console.error("API error:", error.response.status, error.response.data);
return;
}
console.error("Request failed:", error.message);
}
}
getSupportedCurrencies();
import requests
from requests.auth import HTTPBasicAuth
def get_supported_currencies():
try:
response = requests.get(
"https://sandbox-api.aparatech.io/v1/public/config/supported-currencies",
auth=HTTPBasicAuth("aparaUser", "aparaPass"),
headers={
"Accept": "application/json",
"Content-Type": "application/json",
},
timeout=30,
)
response.raise_for_status()
print("Supported currencies:")
print(response.json())
except requests.HTTPError:
print("API error:", response.status_code, response.text)
except requests.RequestException as exc:
print("Request failed:", exc)
get_supported_currencies()
Was this page helpful?