Country calling code for Bosnia and Herzegovina is +387. Buying a SIM card is pretty simple, but you need a mobile phone which is not locked. Most SIM cards can be purchased at news stands or specialised shops, they cost around 5 euros and you get some credit. You can top it up at the same place that you bought the SIM card, but also at supermarkets and some ATMs.
Bosnia and Herzegovina is not in the EU, so it might cost more to make international calls because roaming fees still apply.
There are two post offices in Medjugorje:
1) The one on the corner of Dr. Franje Tudjmana is open:
Mon – Fri: 7 a.m. – 4 p.m.
Saturday: 7 a.m. – 12 p.m.
Phone: +387 36 651-990
2) The one next to the church is open:
Mon – Sun: 8 a.m. – 8 p.m.
Most restaurants, hotels and cafés have free WiFi, so you can ask staff for the password.
If you’ve purchased a SIM card and you have a smartphone, you can also activate a tariff which includes mobile Internet (if you need it on the go). Most of the tariffs include 250, 500 or 1,000 MB, which should be enough for a day or two.