POST /getBalance
Returns the current balance for a balance-based API key.
Request Body
{
"clientKey": "FUN-your-api-key"
}
Parameters
| Field | Type | Required | Description |
|---|
clientKey | string | Yes | Your API key |
Response
Success (200)
{
"errorId": 0,
"balance": 12.50
}
Key Not Found (404)
{
"errorId": 1,
"errorCode": "ERROR_KEY_DOES_NOT_EXIST",
"errorDescription": "Client key does not exist."
}
Database Unavailable (503)
{
"errorId": 1,
"errorCode": "ERROR_DATABASE_UNAVAILABLE",
"errorDescription": "Database temporarily unavailable. Please try again."
}
Response Fields
| Field | Type | Description |
|---|
errorId | integer | 0 = success, 1 = error |
balance | number | Current balance in USD |
errorCode | string | Error code (only when errorId: 1) |
errorDescription | string | Human-readable error message |
Example
import requests
resp = requests.post("https://api.funbypass.com/getBalance", json={
"clientKey": "FUN-your-api-key"
})
data = resp.json()
print(f"Balance: ${data['balance']}")
Balance reflects the most recent synced value. Pending deductions and refunds may take a moment to be reflected.