This is what happened, according to Wookiepeidia.com - yes I seriously looked this up
"After the rescue[on the Death Star], Solo took Leia, Skywalker, and the droids to Yavin 4 to collect his reward. Though he was initially willing to abandon the Rebels, an attack of conscience, (brought on partly by Chewbacca's arguments) led him to join the Battle of Yavin. The Millennium Falcon joined in just in time for Solo to disable Darth Vader's TIE advanced, allowing Skywalker to destroy the Death Star.
Solo infiltrates the Death Star wearing stormtrooper armor.Solo and Skywalker were both awarded medals of honor for their efforts, and Solo was handsomely rewarded with 20,000 Alliance credits and a stash of valuables. However, the chests of treasure the Rebels had given him were stolen from him almost immediately after leaving Yavin by the space pirate Crimson Jack (who, ironically, had ties to the Hutt crimelord), leaving Solo still unable to pay off Jabba. With the help of Luke Skywalker and Princess Leia, Solo managed to defeat the pirate. Following the debacle, Solo gave the recovered money back to the Alliance. Broke and fearing Jabba's retribution, Solo and Chewbacca discovered an ancient cache of treasure hidden in one of Yavin IV's temples. He took the treasure to an Ithorian named Sprool on Zio Snaffkin, who in turn delivered the money to Jabba. It was, however, too little and too late. Jabba kept the money and refused to call off the bounty. Han Solo found himself at square one again. Following weeks of searching for Vader's Tie Fighter, Solo and Organa stopped over at Ord Mantell, where he hoped he might make some money on the sabacc tables and try to get Jabba his bounty. Before long, Solo found himself racing the Togorian Alfreda Goot to Tatooine, after the bounty hunter kidnapped Organa. Before long, Solo had inadvertently handed Vader back over the Empire, encountered a prototype Executor, and rescued the princess of Alderaan, all within the span of a short amount of time. After a misadventure on the massive gambling complex known as The Wheel, Solo hid out for repairs on Orleon and was soon besieged by an emissary of Jabba the Hutt. Within a week, Solo had rescued the emissary from stone mites and, by some miracle, had the bounty taken off of his head. He returned to Tatooine, and started to heal his relationship with the Hutt. He made Kessel Runs for the crimelord, even beating BoShek's most recent record-breaking time. Sadly, this was not to last. The remains of Crimson Jack's Star Destroyer were discovered by the Hutt's agents, and within days the bounty was back on Solo's head. An even higher reward was registered for anyone who could capture him alive so Jabba could kill Solo himself."