Imam al-Shafi'i (may Allah have mercy on him) said: "Her 'uqr (that is, the compensation for having intercourse with her, the customary dower) will be taken from him, and there will be no hadd punishment on him, because of the doubt that he owns some share in her (due to his partnership in the booty)."
Sayyidah Aishah (may Allah be pleased with her) says that the Messenger of Allah (peace and blessings be upon him) said: "Avert the hadd punishments as far as you are able. If you find a way out for the Muslims, then let them go, for it is better for the ruler to err in pardoning than to err in punishing."
The most authentic of the narrations on this from the Companions is the narration of Asim, from Abu Wa'il, from Abdullah bin Mas'ud, as his own statement.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18294