What's the opposite of "cost" when downgrading and you get some of the money back?
I think what you are looking for is a refund.
I'd say "rebate". It is defined so:
n. A partial refund to someone who has paid too much for tax, rent, or a utility. The scheme eases the move to the council tax by giving rebates in the first year.
v [with obj.] Pay back (a sum of money) as a rebate. The government rebates part of your own and your employer's National Insurance contributions into the plan.
If you described and named the second, downgrading transaction more in terms of it being a return of the original upgrade (instead of giving it the separate name of “downgrade”), you could perhaps call it an upgrade “return allowance (upgrade cost less fixed restocking fee/depreciation).
(example usage from ‘Wiley GAAP Policies and Procedures’ by Steven M. Bragg, via ‘Google Books’)
For a single word that you could use with “downgrade” that implies that some, but not all of the upgrade cost is being returned, there’s “downgrade offset," which ‘Merriam-Webster’ defines as:
6 : something that serves to counterbalance or to compensate for something else; especially : either of two balancing ledger items