Retrieve your balance, invoices, and billing history programmatically with the DigitalOcean API.
Billing API and CLI Reference
Last edited on 5 Dec 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.
The DigitalOcean MCP Server
The DigitalOcean MCP Server lets you use natural language prompts to view and manage account details, billing history, SSH keys, and balances.
View and manage account details, billing history, SSH keys, and balances with the DigitalOcean MCP Server.
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.
The subcommands of doctl balance retrieve information about your account balance.
The subcommands of doctl billing-history are used to access the billing history for your DigitalOcean account.
The subcommands of doctl invoice retrieve details about invoices for your account.