January 29, 2016

Determining your next bill

Example on how to use getNextInvoiceTotalAmount to retrieve the pre-tax total amount of an account's next invoice measured in US Dollars ($USD). The amount assumes no changes or charges occur between now and the time of billing.

require_once './vendor/autoload.php';
$apiUsername = '';
$apiKey = '';

$client = \SoftLayer\SoapClient::getClient('SoftLayer_Account', null, $apiUsername, $apiKey);

try {
    $nextinvoice = $client->getNextInvoiceTotalAmount();
}  catch (\Exception $e) {
    die('Unable to get next invoice: ' . $e->getMessage());


If this article contains any error, or leaves any of your questions unanswered, please help us out by opening up a github issue.
Open an issue