Billing

Read your credit balance and the transactions that changed it.

Read your credit balance and the transactions that changed it, for example to alert before your balance runs out or to reconcile top-ups with your own accounting. See How billing works for how credit is charged.

GET /v1/account/billing_balance
GET /v1/account/billing_transactions

All amounts are decimal strings in US dollars, with currency: "USD".

Endpoints

MethodEndpointDescription
GET/v1/account/billing_balanceGet the billing balance
GET/v1/account/billing_transactionsList billing transactions

The billing balance object

type'billing_balance'optional

Always billing_balance.

balancestringoptional

Credit available to spend, in US dollars.

outstandingstringoptional

Usage that went beyond your balance and hasn't been paid yet. While it is above 0, every request is rejected with 402 until you top up.

lifetime_usedstringoptional

Everything your account has spent so far, in US dollars.

tierstringoptional

Your current rate-limit tier, such as tier-1.

currency'USD'optional

Always USD.

The billing transaction object

type'billing_transaction'optional

Always billing_transaction.

idstringoptional

The transaction's ID.

transaction_typestringoptional

What kind of change this is. See Transaction types.

Allowed values:topuppackagepromotionperkrefundadjustmentusage
amountstringoptional

The change in US dollars. Positive adds credit; negative removes it.

currency'USD'optional

Always USD.

descriptionstring | nulloptional

A short description, such as Topup via QRIS.

created_atstringoptional

When the transaction happened (RFC 3339).

Transaction types

TypeMeaning
topupYou added credit.
packageYou bought a credit package.
promotionCredit from a promotion or promo code.
perkCredit granted with a perk.
refundCredit returned to your account.
adjustmentA manual correction by Aivene support.
usageA usage charge recorded as a transaction.

Ordinary request charges are not listed as transactions: they are taken from your balance as you go. Use request logs for the cost of each request.