Tomcat
Professional
- Messages
- 2,689
- Reaction score
- 921
- Points
- 113
Although the 3rd party payments market in China is extremely extensive, every phone manufacturer, every mobile operator has its own electronic wallets, and their ratings include dozens of names, it is not an exaggeration to say that when considering electronic payment systems, we can limit ourselves to two companies - Tencent and Alibaba . According to 3mbang, in the mobile payments market in 2018, Alipay owned 52.5% of the market, Tencent - 36.7% (in terms of the number of transactions made using mobile terminals). If we count not only phones, but also all electronic devices, then the statistics look a little different - 44.5% for Alipay and 30.3% for Tencent. In any case, when thinking “I need to connect electronic payments”, these two names will appear in any novice (or advanced) entrepreneur’s head. And in 99% of cases, this will be enough - whether we are talking about opening an individual entrepreneur selling shoes, a noodle stand on the street, or a serious website with millions of visitors. All other payments - yes, they are desirable, they have their advantages, but the basic set is these two. Let's look at them in detail.
Naturally, the topic is too broad. And since over the years both networks have grown to the scale of huge, independent and system-forming products (their importance for the existence of the state is evidenced at least by the fact that based on Wechat - a messenger-combine, which is the main tool for payments through Tencent - through a wallet Wechat has test-launched an electronic ID card in some regions, but we won’t be able to cover the vastness. Each network has acquired hundreds of related services - from food delivery and the sale of discount coupons to investment platforms and credit history bureaus. Let’s look at all this from the point of view of a novice businessman. who realized that in 2019, without electronic payments, he is doomed to ruin. So here we will begin, and in further articles we will continue.
So, Wechat offers the following payment solutions:
付款码支付 - payment with a payment code The user opens his Wechat on the page with. personal payment code (containing an 18-digit barcode or QR code), the seller, by reading this code, debits the amount specified by him from the user’s account. That is, from the system side it looks like this:
That is, roughly speaking, this is a form that the seller sends to WeChat, and only the amount and the buyer’s payment code changes each time. And, accordingly, the danger of the method is immediately visible to everyone:
Native payments. The method is completely opposite to the first one, based on the fact that the seller generates a QR code with his data and order amount, and the buyer scans it through his Wechat and confirms payment. The advantages are obvious:
This method has taken root wherever there is a screen on which an updated QR code can be displayed, primarily on desktop websites. It can also be found in places where there is only one mass product - for example, entrance tickets to Sky Park are sold through Native payments Wichat.
Essentially, Native payments are a link in the weixin://wxpay format, which opens in the built-in Wechat browser.
The disadvantages of both of the above methods are the complete lack of feedback and the lack of the ability to personalize payments for a specific user. That is, if we simply sell entrance tickets, this is enough for us - we see the payment has been made, issue a ticket, and the next visitor comes up. But if we want to issue each user a personalized ticket (pulling his full name from WeChat), then when using such payments this is impossible - communication between the seller and the buyer ends at the moment of payment for the order and its confirmation. And the maximum that the seller will see is a message that user 123456789 paid 20 yuan to seller 98765454321 at 12:31. Therefore, other types of payments are becoming increasingly popular. But more about them a little later.
APP payments, or payments in third-party applications. Here, too, everything is extremely simple - the only scenario for using such payments is in mobile applications. Nestle water delivery app, for example. The user orders water, clicks “pay”, the Nestle application calls the Wechat application via Inter-app communication, where the payment takes place. Once the transaction is completed, Wechat sends the information back to the Nestle app and informs it that payment for order 12345 has been completed successfully.
H5 payments. Essentially, this is an updated version of Native payments. Since for quite some time now mobile traffic has prevailed over desktop traffic, and Native payments have not taken root on phones for obvious reasons (mainly due to the fact that in order to scan a QR code with the phone on whose screen it is displayed, you need either a complex system of mirrors, or another phone, or half an hour of gestures from the series “save the code to the album, open WeChat, select scanning from the image), then H5 payments appeared. Essentially, this is just a weixin:// format link on a product web page, which, when clicked on, offers to launch WeChat, and upon completion of the transaction sends information to the callback address
JSAPI payments. WeChat's first attempt to unite everything under one roof and conduct all transactions in its built-in browser. It supports the generation of codes for offline payments, embedding on websites, and payments in public accounts. The attempt was frankly unsuccessful and is now found in few places. But it became a prerequisite for the emergence of small applications, about which a little below.
Of course, it is also worth mentioning two types of payments, which are not payments in their pure form, but are also quite popular:
Possible implementation examples:
But in general, the two platforms are developing more or less evenly and provide equal opportunities. We'll talk about the intricacies of integration and connection next time.
Naturally, the topic is too broad. And since over the years both networks have grown to the scale of huge, independent and system-forming products (their importance for the existence of the state is evidenced at least by the fact that based on Wechat - a messenger-combine, which is the main tool for payments through Tencent - through a wallet Wechat has test-launched an electronic ID card in some regions, but we won’t be able to cover the vastness. Each network has acquired hundreds of related services - from food delivery and the sale of discount coupons to investment platforms and credit history bureaus. Let’s look at all this from the point of view of a novice businessman. who realized that in 2019, without electronic payments, he is doomed to ruin. So here we will begin, and in further articles we will continue.
So, Wechat offers the following payment solutions:
付款码支付 - payment with a payment code The user opens his Wechat on the page with. personal payment code (containing an 18-digit barcode or QR code), the seller, by reading this code, debits the amount specified by him from the user’s account. That is, from the system side it looks like this:
Code:
<appid>wx11112222aaaabbbb</appid> - ID of the seller’s public account in the Wechat system
<attach>Super product</attach> - product description (additional and optional)
<auth_code>120269300684844649</auth_code> - the payment code mentioned above
<body>Water Store</body> - required field - product description and store name
<device_info>1000</device_info> - seller scanner number
<goods_tag></goods_tag> - description of product discounts, coupons, etc.
<mch_id>10000100</mch_id> - seller ID
<nonce_str>8aaee146b1dee7cec9100add9b96cbe2</nonce_str> - a string of randomly generated characters
<out_trade_no>1415757673</out_trade_no> - order number in the seller’s system
<spbill_create_ip>14.17.22.52</spbill_create_ip> Scanner IP
<time_expire></time_expire> time when the order becomes invalid
<total_fee>1</total_fee> amount to be paid
<sign>C29DB7DB1FD4136B84AE35604756362C</sign> - signature
That is, roughly speaking, this is a form that the seller sends to WeChat, and only the amount and the buyer’s payment code changes each time. And, accordingly, the danger of the method is immediately visible to everyone:
- the buyer does not see the amount until it is written off
- Having learned the payment code, an unscrupulous seller can at any time write off any amount from the buyer’s account absolutely without his knowledge.
- However, since the code is one-time use and changes with each launch of WeChat, and the notification of the debited amount comes at the same second, fraud with this type of payment is quite problematic. This method has taken root in almost all offline stores, self-service terminals at McDonalds and almost anywhere where a barcode scanner can be installed and where the buyer has physical access to it

Native payments. The method is completely opposite to the first one, based on the fact that the seller generates a QR code with his data and order amount, and the buyer scans it through his Wechat and confirms payment. The advantages are obvious:
- the buyer sees the amount due until payment is made
- All decisions are made by the buyer - he can refuse payment even after he has scanned the code. The decision to scan/not scan is also made by him.
This method has taken root wherever there is a screen on which an updated QR code can be displayed, primarily on desktop websites. It can also be found in places where there is only one mass product - for example, entrance tickets to Sky Park are sold through Native payments Wichat.

Essentially, Native payments are a link in the weixin://wxpay format, which opens in the built-in Wechat browser.
The disadvantages of both of the above methods are the complete lack of feedback and the lack of the ability to personalize payments for a specific user. That is, if we simply sell entrance tickets, this is enough for us - we see the payment has been made, issue a ticket, and the next visitor comes up. But if we want to issue each user a personalized ticket (pulling his full name from WeChat), then when using such payments this is impossible - communication between the seller and the buyer ends at the moment of payment for the order and its confirmation. And the maximum that the seller will see is a message that user 123456789 paid 20 yuan to seller 98765454321 at 12:31. Therefore, other types of payments are becoming increasingly popular. But more about them a little later.
APP payments, or payments in third-party applications. Here, too, everything is extremely simple - the only scenario for using such payments is in mobile applications. Nestle water delivery app, for example. The user orders water, clicks “pay”, the Nestle application calls the Wechat application via Inter-app communication, where the payment takes place. Once the transaction is completed, Wechat sends the information back to the Nestle app and informs it that payment for order 12345 has been completed successfully.

H5 payments. Essentially, this is an updated version of Native payments. Since for quite some time now mobile traffic has prevailed over desktop traffic, and Native payments have not taken root on phones for obvious reasons (mainly due to the fact that in order to scan a QR code with the phone on whose screen it is displayed, you need either a complex system of mirrors, or another phone, or half an hour of gestures from the series “save the code to the album, open WeChat, select scanning from the image), then H5 payments appeared. Essentially, this is just a weixin:// format link on a product web page, which, when clicked on, offers to launch WeChat, and upon completion of the transaction sends information to the callback address

JSAPI payments. WeChat's first attempt to unite everything under one roof and conduct all transactions in its built-in browser. It supports the generation of codes for offline payments, embedding on websites, and payments in public accounts. The attempt was frankly unsuccessful and is now found in few places. But it became a prerequisite for the emergence of small applications, about which a little below.
Of course, it is also worth mentioning two types of payments, which are not payments in their pure form, but are also quite popular:
- Payments-transfers. Particularly popular among tangerine sellers from carts and noodle sellers from street stalls. The personal QR code of the wallet owner is printed, by scanning which you can transfer a certain amount to him. This is, in fact, illegal, persecuted by the tax authorities, and so on, because the license agreement directly states that transfers cannot be used for commercial purposes and to pay for goods. Except in cases where the seller intentionally registered as an individual entrepreneur and indicated in Wechat that he uses his account to accept payments for business activities. But individual entrepreneur accounts (个体工商户)) are a separate large topic that is not suitable for this article, especially since only PRC citizens and residents of the PRC can register as individual entrepreneurs.
- Payments through aggregators. If the seller is too lazy to register in each of the payment systems, he can register in an aggregator like iapppay.com, print out its QR code and hang it above the cash register/post it on the website. Well, of course, everything will now take place on the aggregator’s side.
- And finally, the last and most pleasant type of payments is payments in 小程序. In Russian it can be roughly translated as “small applications”. 小程序 are essentially web pages that only work from the built-in WeChat browser. A typical use case is that a user scans a QR code via WeChat and gets into the application of a certain company. After which his WeChat is used as login credentials, the developer has access to the full power of third-party WeChat APIs - to obtain information about the user, his geolocation, the results of analyzes of preferences and hobbies, queries on the Internet, and so on - you can’t remember everything. And in his application he can implement absolutely everything, without any restrictions. And, accordingly, add payments in one click. That is, if all the methods described above have their own understandable limitations, then conversion and retention in the application depend only on you. Many companies that started with simple applications have now grown into large monsters, in whose Wechat application people spend more time than on any entertainment site.
Possible implementation examples:
- 小程序 KTV 同乐迪. By entering the room and scanning the QR code on the table, you can order songs from the WeChat application, buy more beer, take part in a survey and get a discount, find like-minded people and bored girls, and so on.
- kebab shop 聚点串吧 - by coming there and scanning the QR code on the table, you can not call the waiter, but order meat in the application itself, take part in the “2+1” promotion for beer, fill out information about yourself and get a discount on your birthday, exchange points for a discount coupon, etc. and so on.
- Naturally, everything is not limited to this. But the good thing is that within the framework of either of the two platforms, you can add an endless number of other related features and opportunities directly to payments. With Alipay, everything is approximately the same, taking into account the difference that Alipay initially developed as a payment service (with further expansion of social functions), and Wechat was initially a social platform, to which payments were later attached.
But in general, the two platforms are developing more or less evenly and provide equal opportunities. We'll talk about the intricacies of integration and connection next time.