After a club investigation, the Perth side decided against sacking the pair, choosing instead to go with the second most severe punishment available.
At the request of the players involved, some of the income from the fines will be used to provide free travel for St Johnstone supporters going to away games over the remainder of the season.
Foster and Swanson got into a physical altercation seconds after the referee had blown for half-time during last Saturday’s meeting with Hamilton.
They were each shown a red card for the offence, leaving Tommy Wright’s men to play the second half with nine men. They would ultimately lose 1-0 to a late Alex D’Acol goal.
Foster and Swanson have since apologised for their actions and have accepted their punishment.
A statement read: “St Johnstone FC have completed their investigation into the circumstances surrounding the dismissals of Richard Foster and Danny Swanson at the game v Hamilton Academical on 1 April, 2017, and have concluded disciplinary hearings for both.
“Richard Foster and Danny Swanson fully accept that they are ambassadors for the club and role models for young fans everywhere. They accept that their conduct fell far below that which is required of them as professional football players with St Johnstone FC and that they brought the club into disrepute.
“The sanctions imposed upon them – a fine of four weeks’ wages – were the most severe, short of summary dismissal.
“The players have accepted the sanctions without question and they wish to apologise unreservedly to the supporters of the club for their behaviour.
“Both players have expressed a desire for a proportion of the fines to be utilised for free bus travel for supporters to the remaining away matches this season and the club is in full agreement with this request.
“The players will now return to training and playing duties where they can channel their energies into contributing to the continued success of the club.”