For example, when the Antares rocket, built and launched by commercial Orbital Sciences Corp burst into flames on October 28, 2014, it carried a lot of expensive payload. Did the company have to refund the loss of payload? Did they only return money received for the launch itself? Who takes the risk - The launch company, or the customer?
It is common practice to have an insurance which covers the loss in case of a launch failure.
Who pays for the insurance (customer or launch provider) is a contract detail.