Skip to content

WaaS Earnings Dashboard

View the fees your business has collected via WaaS transfer fee collection.

Endpoint

GET /api/v1/wallet/earnings

Authentication

Requires API key in the X-API-Key header.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number for recent-fees pagination
limitinteger20Results per page (max: 100)

Response

Success (200 OK)

json
{
  "total_fees_by_currency": [
    {
      "currency": "USDT",
      "network": "TRX",
      "total_amount": "124.50",
      "count": 83
    },
    {
      "currency": "USDT",
      "network": "ETH",
      "total_amount": "44.20",
      "count": 29
    },
    {
      "currency": "BTC",
      "network": "BTC",
      "total_amount": "0.00420000",
      "count": 5
    }
  ],
  "recent_fees": [
    {
      "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "business_id": 7,
      "customer_id": "cust_123",
      "network": "TRX",
      "currency": "USDT",
      "gross_amount": "100000000",
      "fee_amount": "1000000",
      "fee_percent": "0.010000",
      "main_tx_hash": "abc123trxtxhash...",
      "fee_tx_hash": "def456trxfeetxhash...",
      "status": "collected",
      "created_at": "2026-06-26T10:00:00Z",
      "updated_at": "2026-06-26T10:00:00Z"
    }
  ],
  "total_transfers": 117
}

Field Reference

total_fees_by_currency[] — Aggregated totals, one row per unique currency+network pair:

FieldTypeDescription
currencystringToken code (USDT, BTC, ETH, etc.)
networkstringNetwork code (TRX, ETH, BTC, etc.)
total_amountstringTotal fees collected, human-readable (not base units)
countintegerNumber of fee-collection events

recent_fees[] — Individual fee ledger records:

FieldTypeDescription
uuidstringUnique fee record ID
business_idintegerYour business ID
customer_idstringYour customer identifier
networkstringBlockchain network
currencystringToken transferred
gross_amountstringFull transfer amount in base units
fee_amountstringFee collected in base units
fee_percentstringPercentage applied at the time of collection
main_tx_hashstringMain transfer transaction hash
fee_tx_hashstringFee transaction hash (empty for BTC/LTC/BCH — fee is part of main tx)
statusstringAlways "collected"
created_atstringISO 8601 timestamp

total_transfers | integer | Total number of fee-collecting transfers (all-time, not paginated) |

Amount Formats

  • total_fees_by_currency[].total_amount is in human-readable format (e.g. "124.50" USDT)
  • recent_fees[].gross_amount and recent_fees[].fee_amount are in base units (e.g. "124500000" for 124.50 USDT on ETH)

Example Requests

javascript
const response = await fetch(
  'https://payments-api-dev-966260606560.europe-west2.run.app/api/v1/wallet/earnings?page=1&limit=50',
  {
    headers: { 'X-API-Key': 'live_sk_your_key_here' }
  }
);

const earnings = await response.json();

console.log('Total USDT earned (TRX network):', earnings.total_fees_by_currency
  .find(e => e.currency === 'USDT' && e.network === 'TRX')?.total_amount);

console.log('Total fee-generating transfers:', earnings.total_transfers);
python
import requests

response = requests.get(
    'https://payments-api-dev-966260606560.europe-west2.run.app/api/v1/wallet/earnings',
    headers={'X-API-Key': 'live_sk_your_key_here'},
    params={'page': 1, 'limit': 50}
)

earnings = response.json()
for row in earnings['total_fees_by_currency']:
    print(f"{row['currency']} on {row['network']}: {row['total_amount']} ({row['count']} transfers)")
bash
curl 'https://payments-api-dev-966260606560.europe-west2.run.app/api/v1/wallet/earnings?page=1&limit=20' \
  -H 'X-API-Key: live_sk_your_key_here'

Rach Payments API