Typically, the deposit is refunded when the card is closed or upgraded, provided there's no outstanding balance.