There are five different types of taxes generally taken from paychecks by employers in Japan:
- Income tax (所得税)
- Residence tax (住民税)
- Pension (厚生年金)
- Health Insurance (健康保険)
- Unemployment Insurance (雇用保険)
Income tax is covered under Japanese tax laws, and generally is difficult for salaried employees to reduce (barring standard deductions such as having dependent family members or the like), as the employer will file all income tax paperwork for you. If you were considered self-employed (自営業) under Japanese law during the time, you can dramatically reduce your tax rate by filing deductions. Here is the 2013 English guide on tax filing. If Tunisia has a tax treaty with Japan, and you paid income taxes on that income in Tunisia, you may be able to get that portion refunded.
Residence tax is paid as a portion of your income tax and is different depending on the city you live in. Since each city has different rules about how those taxes are handled, the best bet is to either contact the city office and ask directly, or to talk to an accountant who is familiar with the taxes in that city. If you lived in the middle of nowhere, the taxes should be lower (or non-existent), and may be difficult to find an accountant to reduce.
Pension payments for up to three years can be refunded if you file paperwork prior to leaving the country, and again after being out of the country. See the Japanese government website for details. Since you are already abroad, if you have not filed the paperwork from Japan and turned in your foreign registration card (along with your work permit) at the airport on departure, you are not eligible.
Pension payments, along with Health Insurance and Unemployment Insurance may be waived if Tunisia has a totalization agreement with Japan. A totalization agreement prevents you from being double-taxed for services like pension or healthcare, and allows you to apply benefits from one country to the other along with the terms of the agreement. So if you were paying social security (health, unemployment, pension) in Tunisia for the work being done in Japan, you may be eligible for a refund for those payments.
Generally speaking, the largest contributions from a paycheck will be Income Tax and Pension, followed by Health Insurance, Resident Tax, and Unemployment Insurance. You can see the breakdown on your pay stub, and look in to the largest payments individually from there.