Skip to main content
QPSOFTWARE

China Payment Gateway Integration: WeChat Pay, Alipay and UnionPay

QPSoftware integrates Chinese payment gateways into e-commerce websites, mobile apps and WeChat Mini Programs, for foreign brands that sell to China and for companies based there. Our developers in Shanghai connected WeChat Pay to the Huttopia booking Mini Program, and linked the Ma France store to a cross-border payment platform that pays out to a bank account in France.

China payment gateway integration takes more than a plugin: each provider has its own APIs, merchant accounts and rules, and a foreign merchant also has to decide how and where it is settled.

Why selling in China needs Chinese payment methods

China prefers local solutions, and its web is no exception. Facebook, Google, YouTube and Instagram are blocked, so brands reach Chinese customers through platforms such as WeChat, Baidu and Weibo. Hosting has its own rules too, covered by our China website compliance consulting.

Payment follows the same logic. To sell to Chinese customers, your checkout has to offer the local methods: Alipay and WeChat Pay for mobile payment, and UnionPay for bank cards. These three methods have to be integrated into your e-commerce website, app or Mini Program, which calls for a specialist in payment gateway integration.

Our comparison of the most popular payment gateways in China looks at the main options for foreign merchants and how each handles cross-border payments. For the central bank’s digital currency, read our explainer on the digital yuan (e-CNY).

Alipay, WeChat Pay and UnionPay: the APIs we integrate

These gateways may look simple to integrate. They are not: each provider has several APIs, one per use, and each one works differently.

  • UnionPay: separate products for consumers who pay by card on a PC website (the online gateway payment) and for companies that pay B2B through their corporate online banking, as listed on the UnionPay Open Platform. Mobile websites and native apps use other APIs. B2B and B2C payments differ in the amounts that can be paid and in security: a B2B payment adds an authentication step with the company’s USB key.
  • Alipay: three main APIs, for desktop websites, mobile websites and native apps. They cover all platforms and are simpler to implement.
  • WeChat Pay: one API per payment scene, as the WeChat Pay documentation for overseas merchants shows: barcode payment in stores, QR code payment on desktop websites, payment inside an Official Account page or a Mini Program, in-app payment, and H5 payment in mobile browsers outside WeChat. QPSoftware published on GitHub a Drupal Commerce module for WeChat Pay H5 payment in mobile browsers such as Chrome, Safari and Firefox (Drupal 7, last updated in 2018).

Other scenarios, such as refunds, sometimes need custom functions on top of the standard APIs.

Payment gateways and cross-border e-commerce

Once your payment gateway works, a global payment company can let your Chinese customers pay in their local currency, RMB, and send you the money in the foreign currency you selected. WeChat Pay’s cross-border service, for example, settles merchants in 16 currencies, including USD, EUR and GBP.

This method lets you sell to China without a Chinese entity, with no physical presence there. You still need to manage other aspects, such as logistics and delivery for your Chinese customers. Both wallets are also accepted by merchants outside China, as our article on WeChat Pay and Alipay around the world explains.

Payment projects we delivered

  • Huttopia: WeChat Pay and WeChat Login in a booking Mini Program, with a middleware that gets each user’s OpenID to generate the signatures WeChat Pay requires, and creates the orders in Huttopia’s systems in France.
  • Ma France: the API between the WeChat Mini Program and the GoAllPay platform, with automatic currency conversion on the store. Payments from the WeChat wallet are transferred to Ma France’s bank account in France.
  • Lucrin Geneva: Alipay, UnionPay and WeChat Pay on a localized Magento website.
  • Baby International Blu and Ichimore: Alipay, UnionPay and Visa/MasterCard payments on PrestaShop stores.

How we integrate your payment gateway

Payment integration can be a project on its own or part of a wider China e-commerce development project. Either way, we follow our agile methodology, with a test at every step.

  1. Methods and model: which payment methods, on which channels, and whether you are paid in China or through a cross-border account.
  2. Merchant accounts: the application with the provider or with a partner institution, and the credentials your store needs.
  3. Development: the payment flow of each channel, signatures, payment notifications, refunds and, for cross-border sales, currency display.
  4. Testing: every flow tested with minimal amounts before launch.
  5. Launch and follow-up: payment monitoring and reconciliation, and updates when a provider changes its API.

Frequently Asked Questions

Can a foreign company accept WeChat Pay without a Chinese entity?

Yes. WeChat Pay has a cross-border service for overseas merchants: the customer pays in CNY and WeChat Pay settles in a foreign currency. In Hong Kong, the UK and Singapore, WeChat Pay can contract directly with merchants. Elsewhere, the account is opened through a payment institution that holds the contract with WeChat Pay and pays its merchants. Alipay offers a cross-border payment service as well.

In which currencies are we settled?

WeChat Pay settles overseas merchants in 16 currencies, including USD, EUR, GBP, HKD, JPY and SGD. You choose one, and USD is used as the intermediary for other currencies. Alipay's cross-border solution lists more than 20 currencies. Settlement also has thresholds: WeChat Pay transfers the funds once the turnover of a merchant or institution reaches USD 800, and Alipay's default mode starts at USD 5,000.

How long does a payment gateway integration take?

It depends on two things. First, the accounts: the payment provider or the partner institution verifies your company before you receive your merchant credentials, and each one has its own process. Second, the scope: the number of payment methods and channels (website, mobile browser, app, Mini Program) and specific flows such as refunds or currency display. We give you a schedule once the accounts and the scope are clear.

Are Chinese payment integrations secure?

With WeChat Pay and Alipay, the customer confirms the payment on WeChat Pay's or Alipay's own interface, so your store never handles their wallet password. Requests between your server and the provider are signed with your merchant keys, and we confirm an order only after the payment result is verified on the server. UnionPay's B2B payment adds an authentication step with the company's USB key.

What is Alipay+ and do we need it?

Alipay+ is Ant International's gateway that connects merchants with many mobile wallets through a single integration, for online and in-store payments. It is not the only way to accept Alipay: a direct Alipay cross-border integration also exists. The right choice depends on the wallets your customers use and on your payment partner, so we compare the options with you before development starts.

WHY QPSOFTWARE?

Founded in 2009 and based in Shanghai, QPSoftware has integrated Chinese payment methods for brands such as Huttopia (WeChat Pay in a booking Mini Program), Ma France (cross-border payment settled in France) and Lucrin Geneva (Alipay, UnionPay and WeChat Pay). Our developers work with the APIs of each provider and published a WeChat Pay module on GitHub. We help companies from around the world sell to Chinese customers, and Chinese companies grow in their local market.

E-COMMERCE LATEST WORK