Invoice

The account/invoice api request returns your next invoice.

Version

1.0.0

Request Parameters

Parameter Valid Input Default Required Description
customer_id unsigned integer - yes The customer_id the data should be requested for
token string - yes The token generated for this request. See token for more information

Examples

For all examples we are using GuzzleHttpClient.

Get invoice for customer_id 1

<?php 

use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;

function getInvoice() {
    try {
        $client = new Client();
        $response = $client->post('https://my.ngz.net/api/account/invoice',
            array(
                'json' => array(
                    'customer_id' => 1,
                    'token' => 'C9FBFB090B8E6BBB1EED94D2259F94D98CDBCB57A710558DA0'
                )
            )
        );
    } catch (ClientException $e) {
        throw new Exception($e->getResponse()->getBody()->getContents(), $e->getResponse()->getStatusCode());
    }
    if(is_object($response) && $response->getStatusCode() == 200) {
        $reply = json_decode($response->getBody()->getContents());
    }
    return $reply;
}

Sample output

Array 
( 
    [0] => 1.99 
)
Copyright 2016 by United Gameserver GmbH. Alle Rechte vorbehalten.V3.1.5.1337