Version: v1.0

Check Balance

To check the balance of a given subscription the SIM Subscriptions endpoint can be called in order to get the complete list of subscriptions in that SIM. All subscriptions that were ever used in the SIM are returned in the response and it's up to the client code to filter for active subscriptions in order to calculate the balance.

Example Request#

curl -X GET \
https://services.truphone.com/connect-api/v1/sim/8944474600000109299/subscriptions \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'X-Correlation-ID: unique-id-from-requester-123'

Example Response#

[
{
"status": "DEPLETED",
"id": "Njc1NzY1NzY1ZDIK",
"initialBalance": "314572800",
"spentBalance": "314572800",
"activationDate": "2019-08-01T09:09:33Z",
"expirationDate": "2019-08-02T09:09:33Z",
"createdDate": "2020-03-19T15:51:41Z",
"product": {
"id": "MzA5MjE3ODMwOTEyCg==",
"name": "Prepaid data 30GB",
"period": 0,
"period_unit": "DAYS",
"plan_id": "TruphoneinternalPlan_Id"
},
"iccid": "8944474600000109299",
"device_id": "12345657",
"auto_renew": "false"
}
]