Roseanne Forking Over $40,000 to Ex-Husband

11/18/2011 3:50 PM PST

Roseanne Barr -- Ordered to Fork Over $40K to Ex-Husband Ben Thomas

Roseanne Barr is being forced to make a $40,000 payment to her ex-husband -- mostly for his attorney's fees in their nasty child custody war.

Ben Thomas had actually demanded $100,000 from Roseanne -- purely as punishment for dragging him through the custody battle ... which they settled back in August. Yesterday, the court bumped that down to a paltry $5,000.

However, Roseanne was ordered to pay $35,000 for Ben's lawyers.