A bill before the California Legislature aims to make paper receipts a thing of the past.

Assemblyman Phil Ting, D-San Francisco, on Monday filed AB161, which proposes to automatically opt-in customers for electronic receipts in any retail transaction, including at stores, restaurants and anywhere a company issues paper receipts, unless a customer asks otherwise. He said it would be a first for the country.

“This is an easy solution — instead of making paper receipts the default, let’s make electronic receipts the default,” Ting said at a news conference Tuesday. “These receipts also have (bisphenol A), a chemical that is harmful to our environment and to our health.”

Businesses found not to be in compliance with the law, if it passes, will be given two warnings before getting fined $25 a day for each day it’s in violation, but fines will be capped at $300 annually. It would take effect on Jan. 1, 2022.

The move toward more digital receipts could benefit Bay Area companies like Square, Poynt, and Clover, whose terminals make it easy to text or email proof of purchases. A law change like this could motivate more companies to use such checkout technology. Data from Square shows that its sellers already send more than 10 million digital receipts each month, a figure cited by the bill. Square, Poynt and Clover did not immediately respond to requests for comment Tuesday.

On the environmental front, a report in May by Green America, a consumer advocacy group in Washington D.C., found that 10 million trees and 21 billion gallons of water in America are used to create paper receipts. Green America is a backer of the bill. Plus, paper receipts aren’t effectively recyclable, proponents of the bill say.

“For many years a lot of forms of paper that weren’t truly recyclable, all of that ended up in a bale of mixed paper that got shipped to China,” said Nick Lapis, director of advocacy at Californians Against Waste, which is backing the bill.

After years of taking in the world’s trash to use as raw materials, China enforced its “National Sword Policy” rule on Jan. 1, 2018, which banned 24 types of solid waste, including unsorted mixed papers. China still takes in stacks of clean, sorted paper like bales made out of just newsprint. It also set a tougher standard for contamination levels.

“Printed receipts contaminate the recycling stream,” Lapis said. “Not only are they not recyclable, it makes other recyclables not recyclable.”

Small businesses have largely adopted digital payment systems, and the challenge will be for larger retailers with legacy systems to follow suit, Ting said.

“We want to make sure that what’s going into those blue bins are actually recycled and does not end up in landfills,” Ting said.

Similar environmental bills that have passed in California include a ban on plastic bags and a ban on plastic straws at dine-in restaurants.

Shwanika Narayan is a San Francisco Chronicle staff writer. Email: shwanika.narayan@sfchronicle.com