Bookies!
So your friend's bail was set at around $20,000 for which you paid the bondsman $2000; this being 10% of the total bail amount. And I hate to be the bearer of bad news, but monies paid to Bail Bonds ARE NOT refundable; either in whole or in any other increments or portions.
Bail Bonds are, for all intents and purposes, gambling joint; casinos, and folks who run them are bookies and might as well have their offices in Vegas. They take from you a bet equal to 10% of the total purse and risk paying out 9 times that amount if their horse doesn't come in, or comes in first, depending which side of the bet you are on.
So, unfortunately you will not be getting back any portion of the money you put up, and you were never going to get back any portion of it regardless of whether the bail was revoked or not revoked. The second you handed the money over, it was gone.
fredrikklaw