How long do you have to be in military service to keep your bonus?

In order to keep your bonus you have to complete your full enlistment. I know a guy who got a re-enlistment bonus for signing up for another 4 years. He got kicked out a year later and had to pay pack the money he received.