Thousands of Lottery players were accidentally told they had actually lost in a massive blunder.
An error on Camelot's app meant around 20,000 people were told their winning tickets had actually lost after scanning their QR codes.
The issue happened in the period between November 2016 and September 2020, according to the Gambling Commission.
Camelot, a National Lottery operator, has been fined £3.15million as two problems in the app ending up impacting thousands of players.
Another mistake saw 22,210 players buy single tickets - but they were charged for and received two tickets.
Everyone either received a refund for the ticket they didn't want or paid for their wins.
A final blunder saw marketing messages sent out to customers that had self-excluded on Gamstop, which is a free service enabling users to limit their online gambling, as well as players who had been identified by Camelot as having a gambling addiction.
This message was sent although none of the 65,400 players could buy a National Lottery ticket through the app.
Andrew Rhodes, Gambling Commission Chief Executive, said: "We are reassured that Camelot has taken steps to make sure that their National Lottery app is fit for purpose.
"However, we must caution Camelot that any failings on their duties will be met with consequences.
"Today's announcement reinforces that any operator failing to comply with their licence requirements will be investigated by the Commission and we will not hesitate to issue fines if requirements are breached."
This Commission said Camelot announced it will give the money to good causes.
After 28 years of running the lottery, the company is set to lose its licence as the Commission announced plans last week to transfer to a rival.
Allwyn is reportedly the preferred choice for taking it over, although four parties are currently in a fierce bidding war.
The new company will take over from 2024.