Yes, as Sammy Sofa pointed out, you get the money back and take on the new salary. As long as you don't go over the cap ($1,000) and it doesn't violate any other criteria, it's a legal transaction.
Done and done.
This was your first main roster transaction of the first half.
You have three remaining.