KIMARIE SANTIAGO’s small business is the kind of operation US banks and payments companies have been trying to lure online for years. The COVID-19 (coronavirus disease 2019) pandemic finally made it happen.

Santiago’s Saltopia, which sells infused sea salts with names like “Mustard Been Love” and “Ben There D’Onion That,” spent nine years selling almost exclusively to specialty stores and food distributors. When those businesses shut as stay-at-home orders spread, Santiago wasted no time making the shift.

“Grocery chains, specialty shops, it just died — our wholesale business died,” Santiago said in an interview. “I was like, This is our time. We have to focus all our business right now on direct-to-consumer and figure out how to drive as much sales and traffic to our website.”

As millions of business owners like Santiago make the same calculation, payment companies that process online transactions are seeing a boom.

PayPal Holdings, Inc. posted a surge of as much as 30% in the number of newly active customers in core markets who use the service four times or more in 10 days, the San Jose, California-based company said last week.

“People are jumping in with both feet, and not just dipping their toes in the water,” PayPal Chief Executive Officer Dan Schulman said in an interview. “It’s not hyperbole that we’ve seen a three- to five-year acceleration. That’s the math.”

PayPal shares have climbed by more than 80% this year, one of the top performers in the 71-company S&P 500 Information Technology Index. Shares of Shopify, Inc. and Square, Inc. advanced 170% and 113%, respectively.

At Global Payments, Inc., revenue from processing online payments surged to 25% of the firm’s total as more merchants started to let customers make purchases online, the company said, Monday.

“That was always our plan, but that was our plan two years down the road,” Chief Executive Officer Jeff Sloan said in an interview. “It’s really brought ahead a few years of growth in the business.”

Visa, Inc. has seen online spending, excluding travel, increase by 25% from a year earlier every week since mid-April, twice the growth it was generating before the pandemic.

In-store spending, meanwhile, cratered 50% in early April, Visa said. It improved in recent months as cities around the world started to reopen, but still posted a decline in the high single digits by late June.

“There has been little improvement since,” Visa Chief Financial Officer Vasant Prabhu told investors last week.

For banks and payment companies, the widespread shift to online shopping is an opportunity to help counter a decline in overall spending on credit and debit cards. Online, their cards don’t have to compete with cash or checks, which are still widely used for in-person transactions in the US.

Merchants pay a higher fee for these so-called card-not-present transactions. The networks argue it’s because fraud is more rampant in online purchases, meaning they have to do more to root out the bad guys.

Despite the potential for higher costs, retailers signed up for the ability to take online orders in droves during the second quarter, with PayPal adding 1.7 million merchants, or about three times the typical number. Shopify said new stores created on its platform surged 71% in the second quarter from three months earlier.

“For merchants, moving online is existential,” Mr. Schulman said. “It is how they will stay in business.”

For some banks, the response has been to completely revamp their credit-card rewards, with American Express Co. offering streaming and wireless credits on its popular Platinum card, long known for its travel and dining perks.

“This muscle memory is building up with consumers,” Mastercard, Inc. Chief Financial Officer Sachin Mehra said in an interview. “They have come to realize that experience works really well.” — Bloomberg