To Mark Cuban, coffee could be worth millions — if it's served with a compelling backstory.
Take Kahawa 1893, a San Francisco-based coffee company that Cuban called a "brilliant idea" on a recent episode of ABC's "Shark Tank." The company sources coffee directly from African women who often aren't fairly compensated for their labor, founder and CEO Margaret Nyamumbo said on the show.
Customers can tip those women by scanning a QR code on the bags of beans, and the company matches all tips. In total, Kahawa 1893 and its patrons have given at least $20,000 to women farmers since launching in 2017, Nyamumbo said.
Cuban believed in that mission so much he went out on a limb for Nyamumbo against Kevin O'Leary.
Nyamumbo came in asking for $350,000 in exchange for 5% of Kahawa 1893. When O'Leary said her $7 million valuation was out of line — due to only bringing in $2 million last year in revenue — Cuban interrupted and said, "You're worth more."
Ultimately, every Shark except O'Leary made Nyamumbo an offer, all impressed by her background: Nyamumbo, who grew up as a third-generation coffee farmer in Kenya, said she saw firsthand how the men who owned the land were compensated more than the women doing the actual farming.
The experience was alarming, given how reliant the African coffee market is on women. "90% of the labor in coffee comes from women, but so many are not compensated" because they only own 1% of the land, Nyamumbo said.
As a teenager, Nyamumbo got a scholarship to attend Smith College in Northampton, Massachusetts, and her village fundraised to buy her ticket abroad. She later got an MBA from Harvard University in 2016 while working on Wall Street for Citigroup.
But home still weighed on her mind. The following year, she launched Kahawa 1893 — named after the Swahili word for coffee, and the year coffee was commercialized in Kenya.
Success came quickly. By the time of the "Shark Tank" episode's filming, Kahawa 1893 was on track to hit $4 million in 2022 sales, and was in stores like Trader Joe's and Sprouts, Nyamumbo said.
After O'Leary backed out of negotiations, guest Shark Emma Grede — who admitted she didn't even drink coffee — jumped in, offering $350,000 for 12.5% of Kahawa 1893.
Then, Robert Herjavec proposed a joint investment with Grede, who would lead the deal for the woman-led company: $700,000 for 25% of the company.
Nyamumbo said she was excited about the idea of having two Sharks as investors, but didn't want to give up a quarter of her company. She asked if the pair would consider a more creative deal: $300,000 in cash and $400,000 in debt for 16% in equity.
Cuban and Lori Greiner both said they'd accept similar offers. But Herjavec, saying he didn't want to get overly complicated, ditched the joint proposal and offered a more simple $350,000 for 8%.
Grede matched his offer, noting her experience as a Black woman fundraising for brands like Good American and Skims. Companies led by Black women typically get less than 1% of venture capital funding, according to a CNBC analysis of Crunchbase data earlier this month.
With that, Nyamumbo thanked Herjavec and accepted Grede's offer.
"This is just a dream come true for me, getting another Black woman supporting me and mentoring me," Nyamumbo said. "All the other women farmers that we work with — they're going to be so excited."
Disclosure: CNBC owns the exclusive off-network cable rights to "Shark Tank."
Get CNBC's free Warren Buffett Guide to Investing, which distills the billionaire's No. 1 best piece of advice for regular investors, do's and don'ts, and three key investing principles into a clear and simple guidebook.