Check your credit using XML
Check the current balance available on your account.
https://api.clockworksms.com/xml/balance
Parameters
Key
Your API key, available from your API account.
Response
Account Type
Either PAYG or Invoice, depending whether you top-up by credit card on-line or receive an invoice at the end of each month.
Balance
Current balance in your accounts default currency. For invoice accounts, we instead return the amount spent so far this calendar month.
Currency
Code The three letter ISO currency code for the currency your balance is in. Symbol The standard currency symbol for the currency, useful if you want to display this balance.
Examples
Successful Request
Request
1
2
3
4
<?xml version="1.0" encoding="utf-8"?>
<Balance>
<Key>key</Key>
</Balance>
Response
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8"?>
<Balance_Resp>
<AccountType>PAYG</AccountType>
<Balance>287.58</Balance>
<Currency>
<Code>GBP</Code>
<Symbol>£</Symbol>
</Currency>
</Balance_Resp>
Failed Request
Request
1
2
3
4
<?xml version="1.0" encoding="UTF-8"?>
<Balance>
<Key>invalid_key</Key>
</Balance>
Response
1
2
3
4
5
<?xml version="1.0" encoding="utf-8"?>
<Balance_Resp>
<ErrNo>58</ErrNo>
<ErrDesc>Invalid API Key</ErrDesc>
</Balance_Resp>