SAN FRANCISCO — The in-store payment systems at Starbucks went down Friday at 8,000 company-operated stores in the United States and Canada, leading to an unexpected giveaway of coffee drinks at some stores.

In a statement, the company said the failure was caused not by hackers but by a problem during a daily computer system update. The chain said late Friday that it was still working to resolve the problem, which also affected the chain’s Fresh and Teavana stores.

“We are actively working to resolve the outage, and our stores will remain open and continue to serve our customers,” the company said.

News of the outage spread quickly on social media, with the hashtag #TheFrappening. On Twitter, customers said stores were accepting cash, though in some cases customers said Starbucks workers were giving away its beverages.