api

Utilities API

Utility endpoints for querying balances, exchange rates, and supported cryptocurrencies.

Updated: 3/9/2026

Utility endpoints for querying balances, exchange rates, and supported cryptocurrencies.


get-credit-balance

Query your Credits balance. Credits are used for QuantaPay's fee deduction system.

Request

curl -X POST https://cloud.quantapay.app/api.php \
  -d "function=get-credit-balance" \
  -d "api-key=YOUR_API_KEY"

Response

{
  "success": true,
  "response": {
    "credit_balance": 150.00,
    "credit_currency": "USD"
  }
}
FieldTypeDescription
credit_balancenumberYour current Credits balance.
credit_currencystringThe currency of your Credits balance (usually USD).

get-balances

Query the cryptocurrency balances of all your configured wallet addresses.

Request

curl -X POST https://cloud.quantapay.app/api.php \
  -d "function=get-balances" \
  -d "api-key=YOUR_API_KEY"

Response

Returns balance data for all configured cryptocurrency addresses.

{
  "success": true,
  "response": {
    "btc": {
      "amount": "0.5432",
      "fiat": "35210.50"
    },
    "eth": {
      "amount": "12.345",
      "fiat": "45678.90"
    }
  }
}

get-exchange-rates

Get the current exchange rate between a fiat currency and a cryptocurrency.

Request

curl -X POST https://cloud.quantapay.app/api.php \
  -d "function=get-exchange-rates" \
  -d "api-key=YOUR_API_KEY" \
  -d "currency_code=USD" \
  -d "cryptocurrency_code=btc"

Parameters

ParameterTypeRequiredDescription
currency_codestringYesFiat currency code (e.g., USD, EUR).
cryptocurrency_codestringYesCryptocurrency code (e.g., btc, eth).

Response

{
  "success": true,
  "response": "64850.25"
}

The response is the price of 1 unit of the cryptocurrency in the specified fiat currency.


get-fiat-value

Convert a cryptocurrency amount to its fiat equivalent.

Request

curl -X POST https://cloud.quantapay.app/api.php \
  -d "function=get-fiat-value" \
  -d "api-key=YOUR_API_KEY" \
  -d "amount=0.5" \
  -d "cryptocurrency_code=btc" \
  -d "currency_code=USD"

Parameters

ParameterTypeRequiredDescription
amountnumberYesAmount of cryptocurrency to convert.
cryptocurrency_codestringYesCryptocurrency code (e.g., btc, eth).
currency_codestringYesTarget fiat currency code (e.g., USD).

Response

{
  "success": true,
  "response": "32425.13"
}

get-cryptocurrency-codes

Get the list of all supported cryptocurrency codes and their network groupings.

⚠️ Note: This function is registered in the API router (api.php) but has no handler in the backend (ajax.php). Calling it will pass parameter validation but return an empty response. A handler needs to be implemented before this endpoint works.

Request

curl -X POST https://cloud.quantapay.app/api.php \
  -d "function=get-cryptocurrency-codes" \
  -d "api-key=YOUR_API_KEY" \
  -d "cryptocurrency_code="

Parameters

ParameterTypeRequiredDescription
cryptocurrency_codestringYesPass empty string to get all codes, or a blockchain name (e.g., eth) to get codes for that network only.

Expected Response

{
  "success": true,
  "response": {
    "BTC": ["btc"],
    "ETH": ["eth", "usdt", "usdc", "link", "shib", "bat"],
    "SOL": ["sol"],
    "TRX": ["usdt_tron"],
    "BSC": ["bnb", "busd", "usdt_bsc"],
    "XRP": ["xrp"],
    "LTC": ["ltc"],
    "DOGE": ["doge"],
    "BCH": ["bch"],
    "ALGO": ["algo"],
    "XMR": ["xmr"]
  }
}

The response maps blockchain networks to their supported cryptocurrency codes. Custom tokens (added via Settings → Payments → Custom Token) are also included.