Retrieve your balance, invoices, and billing history programmatically with the DigitalOcean API.
Billing API and CLI Reference
Last edited on 17 Jun 2025
The DigitalOcean API
The DigitalOcean API lets you manage resources programmatically with standard HTTP requests. All actions available in the control panel are also available through the API.
DigitalOcean Billing API Reference
The DigitalOcean Command Line Client, doctl
doctl is the command-line interface for the DigitalOcean API. It supports most of the same actions available in the API and DigitalOcean Control Panel.
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.