If you've ever been on a trip to China, you'll know that paying for things can be very difficult if you're a tourist.

WeChat Pay and Alipay are two of the most popular mobile payment methods in China, and most people pay on those platforms using barcodes, known as QR codes, on their phones.

Not many places accept foreign cards like Visa or Mastercard and tourists have few options but to use cash — but all that's about to change.

Chinese tech giant Tencent operates WeChat Pay's QR code payment systems, while Alibaba affiliate Ant Financial runs Alipay's platform. Previously, users could not use the two digital payment platforms if they did not have a Chinese bank account

But On Tuesday, Ant Financial announced it is launching a version of the Alipay app that will support international debit or credit cards. After downloading Alipay on Google's Android or Apple's iOS, users can register for the international version of the app using their foreign mobile number.

Users can then top up money onto a pre-paid virtual card and begin using Alipay across China. Ant Financial said Alipay will support Visa, Mastercard, Japan's JCB and Singapore's Diners Club cards.

Tencent also said on Tuesday that it would provide support for the same cards, as well as American Express, on WeChat Pay.

Visa tweeted in response to the Tencent news: "This partnership means that we'll be working towards an environment where Visa cardholders will be able to use their Visa card in China at the millions of places where WeChat Pay is accepted, instead of having to rely on cash."

Millions of visitors go to China each year. In 2018, a total of 141 million inbound visitors were in China, up 1.2% compared to a year earlier.

This is the first time WeChat Pay and Alipay will be available to international users.

So far both companies have focused on getting merchants abroad to accept the payment methods so that Chinese tourists can pay when they go on holiday. But both firms have not launched versions of their apps for users based outside mainland China and Hong Kong.