The Shulchan Aruch · Orach Chayim
אורח חיים תקמ״בOrach Chayim 542
Siman 542 of 697 in Orach Chayim — 2 se'ifim
הלכות חול המועדLaws of Chol HaMoed· siman 542
Se’if 1א׳
אֲפִלּוּ מְלָאכוֹת הַמֻּתָּרוֹת אֵינָם מֻתָּרוֹת לַעֲשׂוֹתָן אֶלָּא לְעַצְמוֹ אוֹ לַאֲחֵרִים בְּחִנָּם; אֲבָל בְּשָׂכָר, אָסוּר. וּמִיהוּ אִם אֵינוֹ נוֹתֵן לוֹ שָׂכָר קָצוּב, אֶלָּא שֶׁאוֹכֵל עִמּוֹ בִּשְׂכָרוֹ, מֻתָּר. הַגָּה: וְדָבָר הָאָבֵד מֻתָּר לַעֲשׂוֹת אֲפִלּוּ בְּשָׂכָר קָצוּב (כָּל בּוֹ).
1. (The Law) that one should not do work for others on Chol HaMoed except for free, and in it is two paragraphs. Even work that is allowed, it is not allowed except for oneself or for others for free, but for payment it is forbidden. However if he does not give to him a set payment rather that he eats with him in lieu of payment, it is permitted. Note (Rema): for a matter of loss (Davar HaAvid) it is permitted to do even for a set wage (Kol Bo).
Se’if 2ב׳
כָּל מְלָאכָה מֻתָּר לַעֲשׂוֹתָהּ עַל יְדֵי פּוֹעֵל שֶׁאֵין לוֹ מַה יֹּאכַל, כְּדֵי שֶׁיִּשְׂתַּכֵּר וְיַרְוִיחַ.
2. All work is allowed to be done by a worker that does not have what to eat in order that he be paid (to be able to eat) and profit (even beyond enough to eat).
Shulchan Aruch, Orach Chayim — Torat Emet 363 edition, via Sefaria — public domain
English: Sefaria Community Translation — CC0