It doesn’t work like that. Even if you pay the balance on your Gap card down to -$200 (you have a $200 credit on the card), they will still close it on the day we file bankruptcy. And yes, they will still close it even if your account is in good standing.
Now, there is an exception for credit union lines of credit. They will sometimes allow you to reaffirm, or keep, the line of credit if you agree to keep paying it after your bankruptcy.
I just had a couple in my office who were told by another attorney that if they paid off two of their smaller $300 cards, that there was a good chance they could keep those accounts open. He was wrong, and they just threw away $600 of their tax refund money. The husband was furious, and he had every right to be. They could have used that $600 for food storage or even clothing for their 5 children.
Also, if you pay off unsecured creditors prior to filing bankruptcy, this is called a preferential transfer. It is a bad thing and means that the bankruptcy trustee can sue those creditors you just paid off to recover those monies for the bankruptcy estate. In other words, not only did you throw that money away, but you just caused your creditor to be sued in bankruptcy.