One day during fast in Ramadan, I fell asleep before Maghrib and woke up almost half an hour after Maghrib to break my fast. Did this delay invalidate my fast and I have to make qaza only or qaza and kaffarah both.

Answered according to Hanafi Fiqh by

بسم الله الرحمن الرحيم

(Fatwa: 1392/1064/B=11/1434)

It is mustahab to do iftar as soon as the sun sets. The sawm was not invalid due to delay.
وفى البدائع: ويسن تعجيل الافطار اذا غربت الشمس هكذا روى عن ابى حنيفة – (2/105)
وفى نورالايضاح: ويستحب له ثلاثة (1) السحور (2) تاخيره (3) تعجيل الافطار فى غير يوم الغيم .

Allah knows Best!

Darul Ifta,
Darul Uloom Deoband