To have information on your active contracts, you have to send the request from the example block to the API.
That request will return a response similar to this one:
{
"contracts": [
{
"contract_type": "prepaid",
"contract_creation_date": "2016-02-02 10:52:36",
"credits_bought": 500,
"credits_remaining": 471
},
{
"contract_type": "prepaid",
"contract_creation_date": "2016-10-28 13:55:08",
"credits_bought": 500,
"credits_remaining": 500
},
{
"contract_type": "prepaid",
"contract_creation_date": "2016-10-28 13:56:08",
"credits_bought": 500,
"credits_remaining": 500
},
{
"contract_type": "prepaid",
"contract_creation_date": "2016-10-28 14:16:40",
"credits_bought": 500,
"credits_remaining": 377
}
],
"credits_remaining": 1848
}
For each active (e.g. not expired) contract, you receive information on the contract's type, when you bought it, how many credits you bought and how many credits are left. For your convenience, a separate field named "credits_remaining" contains the total amount of credits you can spend from all of your active contracts. If you have a contract invoiced monthly, you get a simpler answer because your credits are unlimited, like in the following example:
{
"contracts": [
{
"contract_type": "invoice",
"contract_creation_date": "2016-09-29 11:20:39"
}
]
}