Any town incorporated under this chapter has the power to erect and maintain a calaboose or workhouse for the confinement and detention of persons violating any ordinance of the corporation. A person who fails to pay any fine and costs imposed by the corporation commits a Class C misdemeanor.