Login expired. Please log in again.
Based on the Merchant’s environment, a merchant may process a payment via backend access or via physical store access. Payment scenarios include payments requiring password-verification and payments that are exempt from password-verification.
This mode is applied to merchants who are equipped with a unified backend. In this mode, the Cashier communicates with the merchant’s backend first and the backend will subsequently send transaction requests to and receive results from the WeChat payment system.
Figure 6.4 Merchants' Backend Access Process
This mode is applied to merchants who communicate with the WeChat payment system via a public network. In this mode, the Cashier initiates a transaction request and handles returned results directly with the WeChat payment system. However, the Merchant can process other transactions between their physical stores and backend based on their requirements.
Figure 6.5 Physical Store Access Process
This section uses the Merchant’s backend access mode to illustrate the payment process, as shown in the sequence chart below.
Figure 6.6 Sequence Chart of Password-Exempt Payment
Password-exempt payment steps:
1. The Cashier creates a payment order on their point of sale terminal and shows the payment amount to the Payer;
2. Payer opens WeChat and enters “Quick Pay” in "Me"->"Wallet";
3. Cashier scans the bar code on the “Quick Pay” screen via their scanner;
4. Scanner reads and transfers the code data to the Cashier’s point of sale terminal;
5. The Cashier initiates payment request to Merchant's backend after receiving payment information.
6. The Merchant’s backend handles the payment request sent by the physical store point of sale terminal and creates a signature for it, and then calls the 【Submit Quick Pay API】 to start a payment request to the WeChat payment system;
7. The WeChat payment system receives the Merchant's payment request, processes the data after validation, and returns a payment result to the Merchant's backend. If the transaction is successfully paid, the WeChat payment system sends the payment result to the Merchant and payer at the same time via SMS or via a WeChat message;
8. The Merchant's backend validates the signature to process relevant data, and sends the payment result to the Cashier’s point of sale terminal.
9. The Cashier delivers goods to the Payer after receiving a successful payment result.
The password-verification payment process is quite similar to that of password-exempt payments. The first 5 steps are identical. During the password-verification payment process, the WeChat backend prompts the Payer for their payment password after the Merchant’s backend calls the 【Submit Quick Pay API】 to initiate a payment request. After the Payer has successfully verified their payment password, the API returns a USERPAYING status immediately to the Merchant’s backend, and the Merchant's backend communicates to the WeChat payment system Query Order API in order to confirm whether the order was successfully paid for.
The password-verification payment process is shown in the following sequence chart:
Figure 6.7 Process Diagram for Password-Verified Payment
Here we show only the steps that are different from those previously described.
1. The Cashier’s point of sale terminal initiates a payment request to the Merchant’s backend after creating the order;
2. The Merchant’s backend calls the 【Submit Quick Pay API】 to create a payment transaction;
3. The WeChat payment system verifies the Merchants' request and determines whether password verification is required;
4. The WeChat payment system returns a USERPAYING status and the Merchant's backend sends a response containing a result to the Cashier’s point of sale terminal;
5. WeChat payment system prompts the Payer to enter their payment password on their WeChat;
6. The Payer confirms the payment and enters their payment password;
7. The Payer submits verification after entering their password;
8. The WeChat payment backend returns a payment result after the Payer completes the transaction on WeChat and notifies the Payer of the result via SMS and a WeChat message;
9. The Merchant's backend receives USERPAYING status from the WeChat payment system and queries the actual payment result via the 【Query Order API】 (For more information, see Public API);
10) If the WeChat payment system replies with a payment status of USERPAYING, the Merchant’s backend calls the 【Query Order API】 every 5 seconds to determine the final actual payment status. If the Payer cancels their payment or delays their payment for more than 30 seconds, the Merchants' backend halts the polling process and calls the 【Revoke Order API】 to revoke the transaction.
Follow the instructions below to troubleshoot any payment exceptions:
1. If the Payer cannot find their order in their transaction history when they're prompted of a payment error on WeChat, they will require the Merchant to initiate the order again; if the order is successfully paid for, the Merchant’s backend calls the 【Query Order API】 to query the actual payment status again;
2. The Payer will need to repeat the payment process if they're prompted of a payment error caused by insufficient balance, an invalid card or for other reasons;
3. The Merchant’s backend should call the 【Revoke Order API】（For more information, see Public API) to cancel a transaction whenever the transaction times out or the payment fails;
4. The Merchant’s backend should send a payment error message to the Cashier’s point of sale terminal when it is caused by an abnormal bank system error, insufficient balance, unsupported bank, or for any other reason;
5. Depending on the type of error code returned, the transaction may be canceled. For details, see API Return Error Code List.