To sell items in a settlement, you use your Diplomacy skill.
Each settlement has a maximum value of items it may purchase. To determine what percentage of that maximum you can grab, you may roll 1d4 per 5 ranks you have in Diplomacy.
To determine the number of items you sell (up to the town value limit) you roll 1d6 + 1d6 per DC check starting at 10 (+5 after each success).
To sell at increments of 10% increase up to 50% you must roll a Diplomacy check with the following difficulties:
10% DC 15
20% DC 20
30% DC 25
40% DC 30
50% DC 35
60% DC 40 and DC check must be a natural 20