‘Ali reported the Prophet as saying, “If anyone transgresses and receives his punishment in this world, God is too just to repeat the punishment to His servant in the next; and if anyone transgresses and God conceals it and forgives him, He is too generous to go back upon a thing He has forgiven.”
Tirmidhi and Ibn Majah transmitted it, Tirmidhi saying this is a gharib tradition.