Is there an API I can use to monitor my wallet balance?

Your Smile Identity wallet balance is always available by logging into the Smile Identity dashboard. However, if you would like to monitor it programmatically there is an APi to which will tell you you current balance. The default currency is USD.

POST https://[env].smileidentity.com/api/v2/partner/wallet_balance

Where [env] is either "portal" or "prod"

The information returned is the same. The env variable here is to denote which api key you are using to authenticate the request.

JSON request body:

{
'partner_id': '<Put your partner ID here>',
'timestamp': <Put the timestamp received from generate_sec_key() call here>,
'sec_key': '<Put sec_key received from generate_sec_key() call here>',
'currency': <optional "KES", "NGN", "USD">,
'environment': <'test' or 'production' to indicate which api key was used>
}

Example response:

{
"wallet_balance": 500.0,
"current_as_of": "2020-05-21T20:39:56.173Z",
}

The "current_as_of" field indicates the last time your wallet was debited. We deduct jobs from your wallet as a background process rather than real-time. Much like a credit card bill, there will be a slight delay between the wallet balance and the actions taken by your users.