If your visa application is denied, you are not given a refund. Only if you cancel the exam well in advance or are unable to take it because of health reasons will you be given a refund. The cost of the IELTS exam is not refundable.