On the plane you will receive an Arrival Departure Card to fill out. You must keep this card carefully. Upon departure from Indonesia, the Arrival/Departure Card will be confiscated again by the immigration authorities.
You will also receive a customs card on the plane, which you fill out and it will be taken at the final customs control upon arrival.