The Chinese are spending trillions of dollars on their credit and debit cards, and U.S. companies are finally getting a slice of that giant pie.

China announced Wednesday that foreign companies like Visa, MasterCard and American Express can bring their payment processing networks into that country, starting June 1.

The news sent shares of Visa and MasterCard soaring.

The Chinese payment industry is massive, and up until this announcement, was closed off to foreign-owned companies.

While foreigners or locals in the world’s second-largest economy could use their Visa or MasterCard, the companies were charged a fee by a government-approved company called UnionPay to process transactions. Chinese Visas or MasterCards had to be co-branded with UnionPay.

Customers in China spent $5.2 trillion on UnionPay’s network in 2013, according to China’s Central Bank, up 48 percent from the year before. By comparison, Visa handled $6.9 trillion in transactions.