Skip to main content

balances

Creates, updates, deletes, gets or lists a balances resource.

Overview

Namebalances
TypeResource
Iddigitalocean.billing.balances

Fields

The following fields are returned by SELECT queries:

The response will be a JSON object that contains the following attributes

NameDatatypeDescription
account_balancestringCurrent balance of the customer's most recent billing activity. Does not reflect month_to_date_usage. (example: 12.23)
generated_atstring (date-time)The time at which balances were most recently generated. (example: 2019-07-09T15:01:12Z)
month_to_date_balancestringBalance as of the generated_at time. This value includes the account_balance and month_to_date_usage. (example: 23.44)
month_to_date_usagestringAmount used in the current billing period as of the generated_at time. (example: 11.21)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
balance_getselectTo retrieve the balances on a customer's account, send a GET request to /v2/customers/my/balance.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

To retrieve the balances on a customer's account, send a GET request to /v2/customers/my/balance.

SELECT
account_balance,
generated_at,
month_to_date_balance,
month_to_date_usage
FROM digitalocean.billing.balances;