How long will it take the refund to be processed if the transaction fails?

If the fee is paid by direct transfer from your Federal Bank account, then refund will be processed in realtime. For Upi payments, refund will be initiated on next working day.