NEW YORK (AP) — Payment processing giant Visa’s profits rose 21% in the first three months of the year fueled by a large jump in spending on the company’s namesake credit and debit card network.

The San Francisco-based company reported Tuesday that it earned $3.65 billion, or $1.70 a share, in its fiscal second quarter that ended March 31. That was up from $3.03 billion, or $1.38 a share, in the same period a year earlier.

Its earnings adjusted to exclude one-time items amounted to $1.79 a share. The results topped the expectations of analysts, who were looking for Visa to earn $1.65 a share on an adjusted basis, according to FactSet.

Visa’s results were driven largely by a significant jump in the amount of money and the number of transactions that went through its payment network. The company processed $3.384 trillion in payments on its network last quarter, up 17% from a year earlier. Visa earns a fee from every transactions that uses its network.

While Visa said it did see a slowdown in transactions at the beginning of the year due the spread of the omicron variant coronavirus, payments quickly recovered in the later part of the quarter.

“While the geopolitical environment remains uncertain, we expect continued growth driven by a robust travel recovery and through the enablement of traditional and newer ways to pay globally,” Al Kelly, Visa’s CEO and chairman, said in a statement.

Visa’s stock was up more than 5% in after-hours trading following the earnings report. Visa shares are down roughly 7% for 2022, compared to the 12.4% year-to-date drop of the S&P 500.

The company has benefitted in recent years by a global shift of consumer behavior toward digital payments, particularly during the pandemic. Consumers have been buying more goods and services online, which often requires using a credit or debit card. Because Visa and its biggest competitor Mastercard dominate credit and debit card spending, that has translated directly into their bottom lines.

In its earnings call with investors, Kelly noted more than half of all in-person transactions at Target stores were now using tap-to-pay at checkout.

Visa reported a $60 million charge to its bottom line related to winding down its operations in Russia. Like many global companies, Visa announced it was pulling out of Russia due to the Kremlin’s invasion of Ukraine.