United States/NY state here.
I would like to form a business entity whose primary purpose will be helping the public at large with a very specific charitable cause. This will be a 501(c)(3) charitable nonprofit. However I would like to sell a variety of goods and services, so as to raise money to fund our charitable activities. Things like coffee mugs, t-shirts and other kits related to our cause that the public-at-large might be interested in buying.
Are 501(c)(3) nonprofits allowed to sell goods and services to the public (like any other for-profit would)? Provided that the proceeds/revenue from said sales is actually put to good use? Or do nonprofits need to perform financial gymnastics, such as owning, say, a C-corp or S-corp that does that sales, and passes the dividends back to the nonprofit, etc.?
If nonprofits are not allowed to sell goods and services, where is this documented and what are some legal gymnastics I could finagle to get my desired outcome?
And if they are allowed to sell goods and services, what constraints, regulations, restrictions, etc. apply?