Route the order
This page explains the process of order routing. First, you must understand two concepts:
- Alipay+ wallet: Refers to Alipay+'s Mobile Payment Partners such as AlipayCN, KaKaoPay, and GCash. Orders from Alipay+ wallets are processed according to Alipay+'s logic.
- Direct integration: Refers to the situation where the Acquiring Partner (ACQP) integrates with a wallet independently, without Alipay+. Orders from a directly-integrated wallet are processed according to the ACQP's logic, even if the directly-integrated wallet is an Alipay+ wallet.
After receiving the order information from the merchant, the ACQP must first identify the customer's wallet by checking the user agent in the Entry Code WAP page. Then the ACQP routes the order to the specific wallet.
The following figure illustrates the routing logic:
The routing logic is explained below:
- If the wallet is directly integrated with the ACQP, route the order to the wallet and process the order according to the ACQP's own logic.
Note: If the user agent is
KakaoPay and the ACQP has directly integrated with AlipayCN/KakaoPay, route the order to AlipayCN/KakaoPay.
- If the ACQP is not directly integrated with the wallet, and the wallet is an Alipay+ wallet as specified in the mapping table, call the pay API to route the order to Alipay+.
- If the user agent does not belong to any of the wallets mentioned above, the ACQP can handle the order with its own logic.
User agent - wallet mapping table
The following table describes the mapping relationship between a wallet and its user agent string, where
- The Wallet column indicates which wallet the user agent represents.
- The Full User Agent String column contains examples of the user agent (UA) strings.
- The UA Identifier column indicates which part of the Full User Agent String can be used to identify the UA.
As long as the user agent string contains the UA Identifier, it can be used to identify the wallet.
Full User Agent String
Mozilla/5.0 (Linux; Android 11; SM-G977N Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.90 Mobile Safari/537.36;KAKAOTALK_ONESTORE;KAKAOTALK 2109270; KT/9.2.7 An/11 (ko) PAY/WEB
Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148; PAYAPP/1.15.0 Io/14.4.1 (ko) PAY/WAVE
Mozilla/5.0 (iPhone; CPU iPhone OS 14_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/18D52 Ariver/1.1.0 AliApp(AP/10.2.15.6000) Nebula WK RVKType(1) AlipayDefined(nt:4G,ws:414|672|3.0) AlipayClient/10.2.15.6000 Alipay Language/zh-Hans Region/CN NebulaX/1.0.0
Other Alipay+ wallets, such as TrueMoney Wallet, Touch 'n Go, GCash, DANA, Alipay HK, and
Mozilla/5.0 (Linux; Android 10; Mi 10 Build/QKQ1.191117.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36 Ariver/2.16.0 Griver/2.16.2 AppContainer/10.5.10 AlipayConnect iapconnectsdk/2.7.0