I have tried the console: player.setcrimegold 0 with all of the ids, still the fine in windhelm is stuck on 9040! I can only make it higher. I tried it with -9040 and it didn't work.
You may have typed in the wrong faction ID, and also have included insufficient parameters to the command.
Pay your bounty -
player.paycrimegold <0-1> <0-1> <faction ID> - The first 0-1 choice refers to being sent to jail: entering 1 will let you be teleported to the respective faction's jail, entering 0 won't. The second 0-1 choice refers to keeping your stolen items: entering 0 means you do not lose your stolen items, entering 1 means you do. If you don't add any choice you will be sent to jail without losing your stolen items.
- 00028170 Crime Faction Falkreath
- 000267E3 Crime Faction Eastmarch (Windhelm)
- 00029DB0 Crime Faction Haafingar (Solitude)
- 0002816D Crime Faction Hjaalmarch (Morthal)
- 0002816e Crime Faction The Pale (Dawnstar)
- 0002816C Crime Faction The Reach (Markarth)
- 0002816B Crime Faction The Rift (Riften)
- 000267EA Crime Faction Whiterun
- 0002816F Crime Faction Winterhold
- xx018279 Crime Faction Raven Rock (Solstheim)
Answer comes from my super answer of all Skyrim problems.