Mastercard (MA 0.88%) stock was trading fractionally lower Thursday afternoon -- and generally in step with the broader market -- following the release of second-quarter earnings that beat analysts' consensus estimates.

Like its rival, Visa (V 1.02%), the credit card company's revenue and net income declined in the quarter due to reduced consumer spending. Net income fell 31% year over year to $1.4 billion, while earnings were down 30% to $1.41 per share. Net revenue dropped by 19% to $3.3 billion in the quarter.

Consumer spending fell due to the impact of the COVID-19 pandemic and the recession it triggered, which resulted in a 10% decline in the gross dollar volume of purchases made using Mastercard credit cards. Cross border volume was down 45%, while switched transactions fell 10%. Those declines were offset somewhat by 10% revenue growth from the company's cyber & intelligence and data & services solutions businesses.

A pile of credit cards spread out on a table.

Image source: Getty Images.

Total operating expenses decreased 5%, primarily due to lower advertising and marketing outlays and reduced spending on travel and professional fees.

"Our platform uniquely positions us to support the shift to digital across consumer and business payments that has been accelerated by the COVID-19 pandemic, including an increase in consumers' preference for contactless payments," CEO Ajay Banga said in the earnings release. "Further, our broad range of market-leading services -- from insights and analytics to cybersecurity tools -- means we are able to support our partners' evolving needs in a rapidly changing world. We continue to execute against our strategy and are excited to enhance and grow our open banking reach and capabilities, including through the planned acquisition of Finicity."

On June 23, Mastercard revealed it had inked an $825 million deal to acquire Finicity, a fintech firm and data aggregator. The purchase will help it to build out its platform for open banking, which provides access and control of consumer banking and financial accounts through third-party applications. Visa made a similar move earlier this year when it bought Plaid. The Finicity deal is still pending approval.