Natasha Nilssen was given a hand in deciding Scott McKay's punishment and told how she would be better off financially if he was allowed to avoid a jail term.
Sheriff Lindsay Foulis had told McKay he would be sent to jail unless his former partner decided to spare him.
Yesterday, McKay was ordered to continue paying the mortgage on his home, but he was banned from going near it.
Sheriff Foulis said Ms Nilssen would be allowed to continue to live in the house at his expense for eight months as part of a community payback order.
He prohibited McKay from entering the house in Coupar Angus and ordered him to carry out 210 hours of unpaid work. McKay was also ordered to pay £750 compensation.
McKay, who earns £60,000 a year in the oil industry, told Perth Sheriff Court he paid the mortgage on the home Ms Nilssen had formerly shared with him.
He also said he paid £540 a month maintenance for their child but could not continue those payments if he was jailed as he would lose his job.
Sheriff Foulis said he would take the unusual course of letting Ms Nilssen decide if she needed the money more or wanted McKay to go to prison.
Ms Nilssen was so traumatised by McKay, who has a record of domestic abuse, that she won an interdict to prevent him from going near her again.
McKay, 39, of Brechin, Angus, admitted attacking and injuring Ms Nilssen by grabbing her hair and repeatedly punching her on the face at their former home in Coupar Angus on September 3. It is his third conviction for domestic abuse of Ms Nilssen.
Solicitor Brian Bell, defending, said: "He is devastated and disgusted by what he has done. He recognises the impact upon her. I suggest a compelling reason why you may hesitate to impose a custodial sentence.
"My client has a significant income. He works offshore and his net pay is £3724. He pays £540 pounds a month maintenance.
"She resides in the property which he owns and continues to pay the mortgage, council tax and all other outgoings on.
"The complainer is not employed. Were you to impose a custodial sentence, which I accept might be merited, then not only would Ms Nilssen be the victim in September, but she would again fall victim as he would lose his job and not be in a position to pay maintenance and the mortgage.
Sheriff Foulis said: "There is no doubt in my mind that custody is the only realistic option for you, with this offence and your record.
"If you avoid custody it will be because your former partner would prefer to have continued financial support because you are earning a good wage and supporting her."
Fiscal depute Catherine Fraser told the court the couple had been together for 12 years and have a four-year-old son. They had an argument on September 3 and McKay resorted to violence.
Ms Fraser said: "He grabbed hold of the back of her head and while holding her hair he punched her twice on the face."
At her home, Ms Nilssen said: "The last time he got community service he was really worried about people we knew seeing him, so I know it would get to him.
"If he is going to continue to provide for his child and look for a way to rehabilitate his attitudes, then I think it is a good thing."
McKay was placed on probation and ordered to do community service two years ago when he admitted hitting his partner in the face with a frying pan at a barbecue.