When you resolve your mining dice, first you place each of them on a mine. Then you Reroll each of them. If the new roll is greater than the depth of the mine, you get the payout in gold.
Does that help?