Giving Free Internet to the Next Billion

mCent Magic

In order to provide free Internet to our mCent users, Jana partners with mobile carriers and third-party resellers around the globe. We integrate with the backend of our partners’ systems, allowing us to recharge our user’s mobile phones in real-time. All an mCent user needs to do is request a recharge or “top up” from within the mCent app (using credits earned within mCent) and we are able to instantly send data from their mobile carrier direct to their mobile phone. Presto chango- you have data!

Buying Data

The majority of the partners we work with require us to prepay for a bulk amount of data upfront. Contract terms do vary, but prepayment is a consistent theme across our partners. Mobile operators do not actively, or regularly, extend lines of credit to data-purchase customers. Thus, Jana must buy our data in bulk from our partners. As our user’s top up their mobile phones with data through mCent, our account with the corresponding partner, or mobile operator, is debited for the appropriate amount.

No Money, No Recharge

Having a prepaid account means that when the money runs out, our account gets shut off and our users can’t top up. This is a major concern for us because we want our users to always be able to recharge their phones on mCent.

The solution? Always keep money in the accounts! This seems simple enough, but it is actually a much more delicate process then you would think, and here is why:

1)    Prediction: We need to accurately predict how much volume we will drive on a given partner, for a given time-period, in a given country. This allows us to determine how much money we will need in order to sustain us until we need to send a new payment. We need to properly predict and anticipate volume increases and/or spikes to ensure a busy weekend doesn’t drain an account.

2)    Processing Time: Payments to international partners can take from 2 days up to 6 weeks to process depending on the partner! This means, if an account runs out of money, it is not just as simple as sending a new payment. We need to anticipate when we will expect to run out and process a payment with the proper lead-time to be received before our account depletes. Likewise, if we anticipate a volume increase or an upcoming Holiday, we need to properly prep our balance ahead of time.

3)    Float & Justification: We could just over-estimate how much we need to send a partner to ensure we don’t run out of money, but this can be wasteful and not a smart business decision. We only want to send the amount of money we will actually use. This is especially true given that these are international relationships. Once money is in a country, it is incredibly difficult to get it back. What if we stop working with a partner? We don’t want to lose money because we sent more than we needed. Also, many partners require us to justify our purchase based on volume. They don’t want use buying too little or too much.

Jana’s Solution

All of the above obstacles are manageable, but they are also incredibly burdensome. Especially considering that we have over 100 active partners, each with separate bank accounts and currencies. How do we monitor this many accounts? How do we plan for the differences in volumes in each country, in each account? Manually monitoring these balances is definitely possible, but it is neither scalable nor sustainable. The solution? Automation! Something we love to do at Jana.

Abra Kadabra Automata!

The first rollout of what we now call the “Balance Alert” was simple, but over time as our accounts have gotten larger, our spend and volume bigger, and traffic more volatile, we have had to tweak and adapt the report to fit our needs. The alert will likely never stop being iterated on, which is okay and how we built it.

Balance Alert Creation

Version 1:

  • Calculate which partners will run out of money in the next 14 days based on the spend of the previous day
  • Include All partners on Alert


  • Didn’t show trend in spend- what if yesterday was just a spike?
  • How much money should we send?
  • Postpaid and auto-pay partners on alert

Version 2:

  • Remove postpaid and auto-pay partners
  • Change logic to use a 7 day average instead of last day spend to smooth out spikes and inform how much money to send


  • 7 day average was too big a time period, we were missing legitimate growth
  • Partners were appearing on the balance alert after they ran out of funds, or too late for us to catch it
  • Certain partners required additional lead time of more than 14 days
  • We wanted to maintain account balances for closer to a month or longer

Version 3:

  • Switch to 2 day average to calculate days left at current spend rate
  • Predict how much money to send each vendor to fund them for 35 days and surface that number on the report
  • Add special cases for our longer-to-process partners (65 days of spend, and alert 42 days in advance)


  • 14 days still isn’t long enough to be alerted and get money to partners in time

Version 4:

  • Add 10 days to report. Get alerted when partners will run out of funds within the next 24 days, based on average spend over the past two days

Change is good

Running out of money in partner accounts was a common occurrence prior to the alerts.  It was a constant struggle to maintain the balances despite much manual effort. Since instituting the alert and changing it to meet our needs, we now rarely run out of money in our partner accounts. What does this mean for our users? Fast and reliable access to free data! 


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s