If you would like to work and obtain income in Indonesia, you have to get a Work KITAS that allows foreign citizens to work officially in the country. Currently, you can get a Work KITAS for 12 months with possibility of extension. This is a multiple-entry visa, so you can leave the country and come back as many times as you need during the validity of your visa.
A work permit is the sole legal document that allows foreigner to work and obtain income in the territory of Indonesia.