May I profit from work done for me on Shabbos?
A non-Jewish kablan (independent contractor) who is being paid a specified amount for doing a job (and not an hourly wage), may do work for a Jew on Shabbos since adahta d’nafsheih k’avid (he is working for himself); some of the conditions for working include: the work is not done on the Jew’s premises; there are no explicit instructions to do the work on Shabbos; and no deadline that would necessitate working on Shabbos. The worker may then do the work on their own time, even if it involves Shabbos work (see Halachah #146 and Halachah #557 for more details).
Even when these conditions are met, poskim are machmir (strict) in cases where the Jew is marviach (making a profit) from the non-Jew having done the job specifically on Shabbos. This is because it gives the appearance that the non-Jew is working as a shaliach (agent) of the Jew, or alternatively, the potential loss of profit may cause the Jew to issue instructions to the kablan on Shabbos. The Shulchan Aruch HaRav states that in some cases this applies even if the non-Jew is unaware that the Jew is being marviach.
If there are benefits outside monetary profit, it is not considered marviach and is permissible—for example, the Jew may have a non-Jewish kablan fix an appliance over Shabbos, even though the Jew enjoys the use of the appliance on motzaei Shabbos.*
However, if the Jew conducts business with the repaired machine, such that revenue is generated by running it immediately after Shabbos—whereas it would not have been possible had the non-Jew waited until after Shabbos to repair it—it is assur (prohibited), according to many opinions. Similarly, if the output is on deadline—for example, if a printer is contracted to do a job that is needed immediately after Shabbos, it is also problematic.
There are certain factors for leniency regarding this Halachah (based on Mehadura Basra of Shulchan Aruch HaRav and other sources) and there are also many nuanced aspects to each individual situation. If a contracting conundrum arises, a competent rav should be consulted on a case-by-case basis.
*Some poskim maintain that a Jew shouldn't have direct hana’ah (benefit) from work done by a non-Jewish kablan over Shabbos. This can be accomplished by allowing the amount of time to pass after Shabbos bichdei sheyaaseh (that the non-Jew took to complete the repair). (We may be meikal—lenient—on this matter when the repaired item is needed for Shabbos use.)
להרויח ממלאכת גוי בשבת
כללות דברינו בנויים ומיוסדים ע״ד מהר״י אבוהב הובא בב״י סרמ״ג. וראה שו״ע אדה״ז סרמ״ד ס״א. ובקו״א שם בארוכה. ועייעו״ש בקו״א סק״ט. שם סרנ״ב ס״ה. שו״ת שארית יהודא או״ח ס״ה. וראה כנישתא דבי רב לקו״א שם. ס׳ אמירה לנכרי לוין פכ״ז ופכ״ח.
ואילה״ק במש״כ שם בסרנ״ב שהמתיר לא התיר אלא כשהוא בענין שאם לא יעשה מלאכתו בשבת לא ישלם לו, שה״ז קובע מלאכתו לשבת - דעכצ״ל דמיירי בלא אמר כן להדיא, אלא שהגוי יודע מעצמו שכ״ה, ואין כאן איסור קובע שהוא מדין אמירה לנכרי.
ועוד דין שי״א שאין להשתמש וליהנות ממלאכתו בשבת - שם סרנ״ב סי״א.