Photosynthesis is an endergonic reaction because the plants are absorbing light energy. It's not heat energy but light energy. So they're absorbing that energy to make new stuff.
Photosynthesis cannot happen without adding energy. The energy from that comes from the sun.