You won’t need to worry about paying anything upfront! The agent commissions for selling your HDB flat are only due once the sale is completed.