Deutsche Bank AG wants to get back into the suddenly valuable business of digital payments, nearly a decade after getting out of it.

Germany’s largest lender is setting up a joint venture with U.S. payments giant Fiserv Inc. to offer customers payments-processing services. The joint venture will allow Deutsche Bank’s business clients to accept payments from customers, both in person and digitally, through Fiserv’s platform called Clover, which reads credit cards, debit cards and mobile wallets, and records orders and inventory.

Deutsche Bank is eager to re-enter the payments market after it sold the business in 2012 to the U.S.-based EVO Payments International LLC. At the time, digital payments were associated with risky areas for banks, since some of the business involved processing transactions from high-risk clients such as gambling and pornography websites.

The payments-processing industry, meantime, has exploded as commerce moves online and payment-card use eclipses cash. The pandemic has further accelerated the shift, including in Germany, a country traditionally big on using cash.

Brookfield, Wis.-based Fiserv has grown strongly as part of that boom. Its market capitalization is almost three times that of the German lender.

Deutsche Bank has struggled in recent years. It raised capital multiple times and the bank has paid repeated fines for misleading investors on the sale of mortgage securities and for lapses of anti-money-laundering controls.

After it launched a major overhaul of its business in 2019, results improved last year and the stock price has rebounded, but remains far below where it was a decade ago.

The Deutsche Bank-Fiserv joint venture will make money by keeping a cut of each purchase that goes through the system. Financial terms of the deal or revenue targets weren’t disclosed.

Deutsche Bank said it would offer the new services to its 800,000 small-business customers in Germany and to nonbank clients. The joint venture will be based in Frankfurt and is expected to employ more than 100 people.

Stefan Hoops, head of Deutsche Bank’s corporate bank, said the joint venture won’t have to focus on taking clients from competitors because many businesses in the country are just now turning to e-commerce.

In addition, he said, customers are more tuned in to who is providing them with the service since last year’s collapse of Wirecard AG, a Munich-based company that admitted over $2 billion of its cash actually didn’t exist.

“The question of trust has become a really relevant one,” Mr. Hoops said.

Deutsche Bank said payment transactions are one of the fastest-growing areas in banking, with expected global revenue growth of 6% a year through 2023.

Re-entering the payments-processing business, however, is challenging for European banks. Most lack the resources to catch up on developing the technology, leaving the option of joint ventures or acquisitions.

Several payments giants have emerged in Europe, including Adyen NV and Nexi SpA. But they would be expensive for banks to purchase: Adyen’s market capitalization is higher than most lenders on the continent. Nexi’s is about half the size of Deutsche Bank.

Deutsche Bank considered buying some Wirecard assets out of bankruptcy last year, but eventually dropped out of the race over the sale price. Spain’s Banco Santander SA eventually bought some of Wirecard’s technology assets, as it also seeks to expand in the area.

Write to Patricia Kowsmann at patricia.kowsmann@wsj.com