Sites like Share-A-Sale and Amplifinity provide referral fees. Vendors set the referral fees they're willing to pay and for what services. When the transaction happens, you get paid by the company for introducing a new customer to them. uRefer also allows merchants to set up referral programs for introductions and meetings, in addition to any transactions made.
You can sell your ebooks through Amazon's Kindle program or Apple's iTunes Connect, which gives you access to a large majority of the digital-book reading market and the barriers for entry are incredibly low. You don't need to invest lots of money to make this happen, but you do need to invest lots of time, not only in writing the ebooks, but in marketing them as well.