Yes, professional boxers get paid whether they win or lose a fight. In almost all cases, both fighters will receive compensation regardless of the outcome.
Due to the physically and economically taxing nature of training, professional boxing matches are rarely determined by "winner takes all." Generally, the losing boxer is paid significantly less, but they are still compensated for participating in the fight.
Each boxer's purse (the amount they are paid for the bout) is negotiated before every fight. Boxers are paid differing amounts based on their match up, who is favored, sponsors, and previous experience, among other factors.
Many boxing matches will reward a winning bonus or additional payment for the victorious fighter, which can make the winner's payment much larger than the loser's, at times more than double. However, the losing boxer still receives his or her purse for the fight.