From my understanding of Catholicism, you pay for your sins in purgatory, then get into heaven after they've been paid for. Of course, this version of Catholicism might be different.