Origin of "pay dirt"?

Does anyone know where this phrase originated?

Just curious.

Prospecting and mining.

paydirt
“profit, success,” 1873, from pay + dirt; a word from mining, where it was used in a literal sense from 1856.

From here