If you show up at court when ordered, then you get the money back no matter the decision. If you miss the court hearing, you lose the money.
If you use bonds service then you lose your down payment every time (e.g. 10% of total bond).
At least that's my understanding...