You’re supposed to pay it before you miss a fast, or before Ramadan if you know you can’t participate for the whole month.
Fasting during Ramadan is an obligation on all able Muslims and is one of the Five Pillars of Islam. Muslims must pay kaffarah or fidyah when missing this fundamental aspects of Islam, with a valid reason or not. Charity, as well as compulsory payments like these, emphasise just what an important aspect of Islam the holy month of Ramadan is.
Fidyah is a donation that must be paid, to feed the less fortunate, for not being able to fast during Ramadan. Therefore, fidyah of R33 per day (Shaf’i, Hanbali and Maliki) is payable for each fast missed.