Bank of America Corp (BAC) is wading into the fast-growing business of offering consumers targeted online discounts.

The second-largest U.S. bank on Wednesday will start testing a new service that will allow customers to rack up savings from retailers based on their previous spending patterns.

Customers will receive offers through the bank's online banking website. The discounts will be awarded in the form of cash payments once a month. Customers need not sign up for emailed coupons or check a separate web site, as bargain hunters do with offerings from Groupon Inc and others.

The new service, called BankAmeriDeals, comes as banks are looking for ways to build revenue lost to new regulations that curb debit card swipe fees. Bank of America faced a major consumer backlash last fall when it disclosed plans for a $5-per-month debit card fee. The plan was dropped.

With BankAmeriDeals, the bank will not receive payments from customers or merchants but hopes to deepen relationships with existing customers and attract new ones, said David Godsman, the bank's online and mobile solutions executive.

"This is an opportunity for us," he said.

The service is likely to draw more account activity and card use for the bank, said Beth Robertson, director of payments research at consulting firm Javelin Strategy & Research. Customers may favor the service because the rewards are tied to stores where they already shop, instead of products "they might be interested in," she said.

Bank of America will begin testing the service this week with its own employees in North Carolina, South Carolina and Nevada. It will roll out the program to the rest of its workforce in February.

No timeframe has been determined for when the program will be available to other customers, Godsman said.

To provide the service, Bank of America is working with a company called Cardlytics. Other banks offer similar services, but Bank of America said it is the biggest to enter the fray.

As part of the service, the bank will not share customer data with third parties, including retailers, Godsman said. The service will highlight the bank's ability to track consumer spending, he acknowledged, but he said the bank hopes the relevance of the deals outweighs any customer concerns.

Here's how the service works: When customers log in to Bank of America's online banking site, they will see discount offers -- a percentage off the amount spent at a retailer -- embedded in their statement and under a separate tab. They can accept the offers they want to use.

When customers make their purchases, they pay full price, but at the beginning of the next month they receive cash back in their accounts. Customers can only use Bank of America debit or credit cards to trigger the savings.

The bank may end up holding money for a period of time in the settlement process, but making money off that float time is not part of the program's "core strategy," Godsman said.

Customers can choose to receive alerts about offers and how much money they have saved. They also can opt out of the service.

BankAmeriDeals differs from coupon services offered by other companies because the discounts are based on past spending habits at specific stores and do not require customers to print out coupons, Godsman said.

The bank is not disclosing participating retailers but said they include large discount department stores, fast food chains and local restaurants.