Will the patent application be refunded if it is unsuccessful?

If the fees already paid and the procedures that have occurred are not refunded, if the patentee has paid the actual examination fee before the substantive examination of the invention patent, it is possible to apply for a refund, and it is necessary to apply for a refund. If the exam has already started, this fee cannot be refunded, and the overpaid fee can be refunded or converted into the annual fee for the next year.