Meaning customers are be able to choose to donate part of the payment for a purchase to a charity. “donate to a charity” is the verbiage you want to use in searching discussions.
Saying “to help with their purchase” can imply a foundation is paying part of the customers bill , such as customer struggling with financial issues needing food.
Yes an app like helium can help, or maybe another one but you have to do the legwork of testing them.
Also use line-item-properties or cart attributes , or literal products representing the foundations , on the orders so there is an audit trail.
Beyond that there’s too many moving parts in that process for me to spend time on.
You would need search/create posts on specific parts and narrow any questions.