Specifically, it's based off of the Charisma of the currently active character. So you will get more gold if you tediously send all items to the highest-Cha character to be sold.