Gospel of Thomas
A similar episode occurs in the Gospel of Thomas (verse 100), but there the coin in question is gold.