The second verse (68) is also a supplement to this admonition where it has been said that had it not been for a Divine writ already established, the course of action which you opted for - that of releasing the prisoners against ransom - would have brought upon you some grave punishment.
What is this writ and what does it mean? According to a narration from Sayyidna Abu Hurairah ؓ reported in Tirmidhi, the Holy Prophet ﷺ said: Spoils were not lawful for any community before you. When, on the occasion of Badr, Muslims went after collecting spoils - though, spoils were not made lawful for them until that time - this verse was revealed. It emphasized that this initiative taken by Muslims, before the injunction making spoils lawful for them was revealed, was a sin which deserved instant punishment. But, since the writ of Allah that spoils shall be made lawful for this community was already there in the Preserved Tablet, therefore, punishment was not sent over Muslims for this misconduct. (Mazhari)
It appears in Hadith narrations that, subsequent to the revelation of this verse, the Holy Prophet ﷺ said: The Divine punishment was almost about to descend when Allah, in His grace, held it back and had this punishment come, no one except ` Umar ibn al-Khattab and Sa'd ibn Mu` adh ؓ would have remained safe from it. This tells us that the cause of Divine admonition was the act of releasing prisoners against ransom - and, in the light of the narration from Tirmidhi mentioned earlier, the reason seems to be the act of collecting spoils. But, there appears to be no contradiction between the two. Taking ransom from prisoners is also nothing but a part of spoils.