The Hachamim forbade receiving compensation for work done on Shabbat. This restriction is known as "Sechar Shabbat," and it applies even to work permitted on Shabbat. Even if the payment is rendered after Shabbat, it is still forbidden.
The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) in 306:21 rules that the prohibition applies both to the employee, as well as the employer. The employer is liable for causing the worker to sin. It applies to work done on Yom Tob, as well. There is no difference whether the work performed was actual labor, a service or renting property or equipment. However, if one took food, beverage or medicine on Shabbat on credit, he is obligated to pay for the item he bought.
The prohibition applies to all forms of compensation, including forgoing a debt. It is permissible however to take food or medicine on credit and pay for it after Shabbat.