code: def get_balance(self):
          
          if not SMSGLOBAL_CHECK_BALANCE_COUNTRY:
              raise Exception('SMSGLOBAL_CHECK_BALANCE_COUNTRY setting must be set to check balance.')
          
          params = {
            'user' : self.get_username(),
            'password' : self.get_password(),
            'country' : SMSGLOBAL_CHECK_BALANCE_COUNTRY,
          }
          
          req = urllib2.Request(SMSGLOBAL_API_URL_CHECKBALANCE, urllib.urlencode(params))
          response = urllib2.urlopen(req).read()
  
          # CREDITS:8658.44;COUNTRY:AU;SMS:3764.54;
          if response.startswith('ERROR'):
              raise Exception('Error retrieving balance: %s' % response.replace('ERROR:', ''))
          
          return dict([(p.split(':')[0].lower(), p.split(':')[1]) for p in response.split(';') if len(p) > 0])
docs: Get balance with provider.