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_transactionsAll amounts are decimal strings in US dollars, with currency: "USD".
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/account/billing_balance | Get the billing balance |
| GET | /v1/account/billing_transactions | List billing transactions |
The billing balance object
type'billing_balance'optionalAlways billing_balance.
balancestringoptionalCredit available to spend, in US dollars.
outstandingstringoptionalUsage 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_usedstringoptionalEverything your account has spent so far, in US dollars.
tierstringoptionalYour current rate-limit tier, such as
tier-1.
currency'USD'optionalAlways USD.
The billing transaction object
type'billing_transaction'optionalAlways billing_transaction.
idstringoptionalThe transaction's ID.
transaction_typestringoptionalWhat kind of change this is. See Transaction types.
topuppackagepromotionperkrefundadjustmentusageamountstringoptionalThe change in US dollars. Positive adds credit; negative removes it.
currency'USD'optionalAlways USD.
descriptionstring | nulloptionalA short description, such as Topup via QRIS.
created_atstringoptionalWhen the transaction happened (RFC 3339).
Transaction types
| Type | Meaning |
|---|---|
topup | You added credit. |
package | You bought a credit package. |
promotion | Credit from a promotion or promo code. |
perk | Credit granted with a perk. |
refund | Credit returned to your account. |
adjustment | A manual correction by Aivene support. |
usage | A 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.