People in the building were then forced to evacuate the building as police, fire crews and paramedics rushed to the scene.
Foley was later arrested nearby on Surf Parade at 3am (local time) after police checked security footage.
The Kiwi declined to be interviewed by officers, but told them he was a "resident of New Zealand visiting the Gold Coast for car racing".
Today, his lawyer Bettina Webb told Southport Magistrates that the sex worker did not match the description that was provided and after he tried to get his money, Foley set off the alarm to get her to leave.
Webb said her client's holiday went awry after he engaged in "some very silly behaviour".
She claimed that Foley was intoxicated at the time and said he had no criminal history.
Police prosecutor Senior Constable Jack Mulherin told the court that the cost of fixing the property's damage and the emergency call-out fees is yet to be calculated, but should be known in a couple of weeks.
"It's caused all three emergency services to be deployed, flooded the common room, all because the defendant was, I assume, intoxicated and frustrated," Mulherin said.
Foley pleaded guilty to wilful damage and unlawfully interfering with an apparatus to be used in the event of fire.
Magistrate Catherine Pirie said the damage caused to the apartments was "quite significant" and ruled out Foley's intoxication as a legitimate excuse.
The Kiwi was slapped with A$1,500 fine and was warned he would likely be charged for damages and fees — but has avoided conviction.