Account Balance
Account Balance


Want to know how much credit you still have in CM's prepaid platform? With this API you can very quickly see what you have in your CM Account.


The Account Balance API uses CM's producttokens for authentication. The producttoken can be obtained from the application.

Obtaining your account identifier

The account identifier is the GUID associated with your account. This identifier can be found in the URL of the application. Examples:

URL account identifier 2f1e7331-991b-497d-9a32-dd3c2d79c56d d7836eee-3c32-4fbf-8a26-638db93d8f03 811283f7-caf1-4155-8422-e918e9ac4221



Returns the current balance for the supplied logical account.{accountID}

GET Parameters

name in description required type format
accountID path Logical Account ID true string uuid
X-CM-PRODUCTTOKEN header The api key obtained from string string


http status description
200 OK

{"Currency": "EUR", "Amount": 84.2601}

field description
Currency The currency of your account in ISO4217 Code or empty if the credit is expressed in a number of messages
Amount A number with the credit left, in the provided currency or the number of messages if no currency is specified.

curl -i{accountID}
     -X GET
     -H "X-CM-PRODUCTTOKEN: 0000000-0000-0000-0000-000000000000"
     -H "Content-Type: application/json"
  // cURL v7.18.1+ and OpenSSL 0.9.8j+ are required
  $parameters = array(
    'accountID' => 'accountID'

  $url = ''

  $ch = curl_init();
  curl_setopt_array($ch, array(
     CURLOPT_URL            => $url,
     CURLOPT_HTTPHEADER     => array(
                                 'Content-Type: application/json'
     CURLOPT_HEADER       => TRUE,
  $result = curl_exec($ch);
  $HeaderInfo = curl_getinfo($ch);
  $Body = trim(mb_substr($result, $HeaderSize));
  $ResponseHeader = explode('\n',trim(mb_substr($result, 0, $HeaderSize)));
  $Headers = array();
  foreach($ResponseHeader as $line){
      list($key,$val) = explode(':',$line,2);
      $Headers[strtolower($key)] = trim($val);

  var_dump( array(
      'Body' => $Body,
      'Headers' => $Headers