GET/api/v1/balance

Balance

See what's left, and what you've spent.

Read your balance from your own server, so your team hears about a low balance before your users do.

  • Read it from your serverWarn your team before it runs out
  • Or set an alertIn the console, under Usage & Billing
  • Or top up automaticallyAuto top-up, also in the console
curl https://api.kreatorsfactory.com/api/v1/balance \  -H "Authorization: Bearer $KREATORSFACTORY_API_KEY"

How it works

Read your balance from your own server, so your team hears about a low balance before your users do.

Response fields

FieldTypeRequiredDescription
balance_usdnumberNoWhat's available now.
total_spent_usdnumberNoEverything spent on this account.
total_topped_up_usdnumberNoEverything added to it.
spent_this_week_usdnumberNoSpent since Monday, 00:00 UTC.
spent_this_month_usdnumberNoSpent since the 1st of this month, UTC.
spent_this_year_usdnumberNoSpent since 1 January, UTC.

Response

Response200
{  "balance_usd": 84.20,  "total_spent_usd": 15.80,  "total_topped_up_usd": 100.00,  "spent_this_week_usd": 4.10,  "spent_this_month_usd": 15.80,  "spent_this_year_usd": 15.80}

Money is in US dollars. Times are ISO 8601, in UTC.

Errors

Every error arrives as {"error": {"code", "message"}}. Branch on code; the message may change. All errors.

HTTPCodeWhat it means
401unauthorizedMissing, unknown or revoked key.