Retrieve your balance, invoices, and billing history programmatically with the DigitalOcean API.
Billing API and CLI Reference
Last edited on 17 Apr 2025
The DigitalOcean API
The DigitalOcean API lets you manage DigitalOcean resources programmatically using conventional HTTP requests. All the functionality available in the DigitalOcean Control Panel is also available through the API.
DigitalOcean Billing API Reference
The DigitalOcean Command Line Client, doctl
doctl
is a command-line interface for the DigitalOcean API and supports many of the same actions.
doctl balance
The subcommands of doctl balance
retrieve information about your account balance.
doctl billing-history
The subcommands of doctl billing-history
are used to access the billing history for your DigitalOcean account.
doctl invoice
The subcommands of doctl invoice
retrieve details about invoices for your account.