The rule is tied to the visa on arrival
Unlike countries where onward travel is something an officer might ask about, GOV.UK links it directly to Indonesia's 30-day visa on arrival (VOA): to get one, you must have proof of your onward or return journey. GOV.UK says most main airports and seaports, including those serving Bali, issue VOAs.
Time the exit inside 30 days
A VOA gives you 30 days. If you plan to extend while you're there, the onward date you show on arrival should still be inside the first 30 days. You can rebook your real exit once you know it.
Other things to have ready
- A passport valid for at least 6 months from arrival, with 2 blank pages. That's stricter than many countries.
- GOV.UK notes that the Bali provincial government has introduced a tourist levy. Check the current amount and how to pay before you travel.