Since not going through T-Mobile, then you would just have to pay it off before any trade in
I paid online and got messages immediately stating my device was purchased and my EIP was complete.
As for the trade in, you can trade it in anywhere...I was just looking around and it seemed Apple has the highest offer (aside from selling it yourself). I am new to the process as well, but from what I understand they will mail you a shipping box/label and you send it in. If you elect to have the new phone picked up in a store, I think you can have the direct amount applied prior to financing. That is why I was ok to pay my $400 off on tmobile as the phone w/trade in will "only" cost me about $500 after the credit.