Wechat pay tutorial
v1.0.0图形界面de users and developers through WeChat Pay’s payment methods, integration options, security measures, and eco系统 features accurately and clearly.
运行时依赖
安装命令
点击复制本土化适配说明
Wechat pay tutorial 安装说明: 安装命令:["openclaw skills install wechatpay"] 该技能用于微信相关操作,可能需要相应的平台账号或API密钥
技能文档
技能 Name: WeChat Pay Eco系统 & Integration Specia列出 技能 Description
This 技能 equips an 代理 with comprehensive knowledge of WeChat Pay, covering its user-facing operations, technical integration methods, security protocols, and eco系统 evolution. The 代理 will be able to 图形界面de users through payment processes, assist developers with API implementation, and explAIn the underlying architecture of Tencent's financial techno记录y 平台.
Core Instruction 设置
- User-Facing Operations
When instructing end-users, categorize operations into three primary scenarios:
Active 扫描ning (User 扫描s Merchant): Scenario: The merchant displays a QR code (static or dynamic). Action: The user opens WeChat, selects "扫描," and 扫描s the code. Flow: The user enters the amount (if not fixed) and password to complete the transaction. This is common for street vendors or 扫描ning items on a PC 网页site (Native Pay). Passive 扫描ning (Merchant 扫描s User): Scenario: Supermarkets, convenience stores, or transit gates. Action: The user opens the "Money" wallet and displays the Payment Code (barcode/QR code). Flow: The merchant 扫描s the code with a device. For small amounts (typically under 1000 RMB), this is often password-free (免密支付) for speed. In-应用 & 网页 Payments: Scenario: E-commerce 应用s, Mini Programs, or Official Accounts. Action: The user selects "WeChat Pay" at 检查out. Flow: The 应用 invokes the WeChat SDK, the user confirms the amount and enters their password within the WeChat interface, then returns to the merchant 应用.
- Technical Integration Architecture
For developer queries, break down the integration based on the 平台:
Native Pay (PC/Offline): The merchant server 生成s a QR code using the WeChat Pay API. The user 扫描s it, and the server 列出ens for a callback notification to confirm the order 状态. JSAPI Pay (Official Accounts): Used within the WeChat browser. It requires the merchant to obtAIn the user's openid and use the JS-SDK to invoke the payment window. 应用 Pay (移动 SDK): Requires integrating the WeChat SDK into iOS/Android 应用s. The flow involves a pre-order creation on the merchant server, obtAIning a prepay_id, and passing this to the 移动 SDK to launch the payment. Mini Program Pay: Similar to 应用 Pay but utilizes the specific Mini Program API (wx.请求Payment). It relies on the user's 记录ged-in 状态 within the Mini Program 环境.
- Security & Risk Management
The 代理 must emphasize security protocols and user 保护ion:
Authentication: ExplAIn that WeChat Pay relies on Real-Name Verification (linking bank cards and ID). Transaction Security: Password-Free Limits: 信息rm users that small transactions (e.g., under 1000 RMB) may not require a password to improve efficiency, but this can be disabled in 设置tings. Risk Controls: WeChat Pay employs real-time risk 监控ing. If a transaction 应用ears suspicious (e.g., new device, unusual location), it may trigger secondary verification or block the payment. Fraud 预防ion: Warn users never to 分享 their Payment Code (it acts like a password). Advise agAInst 扫描ning unknown QR codes from untrusted sources to avoid phishing.
- Eco系统 & Innovation
Highlight the broader capabilities and recent developments:
Interconnectivity: Note the recent interoperability with UnionPay Cloud QuickPass and JD Pay, allowing cross-平台 扫描ning in certAIn 上下文s. Biometric Payment: Mention advanced hardware integrations like Brush-to-Pay (Face ID) and Palm-to-Pay (Palm recognition), which allow payments without a phone. Cross-Border: WeChat Pay supports multiple currencies and is widely used by international tourists in China and by Chinese tourists abroad. Troubleshooting & Common Issues "Payment FAIled" or "系统 Error" Diagnosis: This often indicates a network timeout, insufficient balance, or a risk control block. Solution: Advise the user to 检查 their network connection, ensure their bank card has funds, or wAIt 24 hours if the account is flagged for suspicious activity. "Merchant Category Not Supported" Diagnosis: The user is trying to use a credit card for a transaction type that only allows debit cards (e.g., financial products or real e状态). Solution: Instruct the user to switch the payment method to "Balance" or a "Debit Card" in the payment confirmation screen. Refund Delays Diagnosis: Users often expect instant refunds. Explanation: Clarify that while some refunds are instant, bank processing times can take 1-3 business days depending on the issuing bank's policy. 技能 扩展 Suggestions Merchant API V3 迁移
Instruct the 代理 on the differences between the legacy V2 API and the modern V3 API (which uses JSON instead of XML and improved 签名ature mechanisms), helping developers 迁移 legacy 系统s.
Marketing Integration
Expand the 技能 to include "Cash Vouchers" and "Store Coupons" APIs, teaching how to integrate marketing 工具s directly into the payment flow to increase conversion