Alipay Payment Integration
Paste the following prompt into your AI chat to install this skill:
Please install @user_8509461a/alipay-payment-integration according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem: Alipay has many product paths, and choosing the wrong one causes rework
When a request simply says add Alipay or H5 payment, the actual choice may be face-to-face payment, order-code payment, mobile web, PC web, JSAPI, app, pre-auth, or recurring collection. Picking the wrong API such as alipay.trade.pay, alipay.trade.precreate, or my.tradePay can break the checkout flow, SDK dependencies, and signing or recurring deduction logic.
How It Works: Route by scenario, then read live documentation
The Skill uses a routing table and keyword mapping. Offline payment-code receipts route to face-to-face payment; merchant-generated QR codes route to order-code payment; mobile browsers route to alipay.trade.wap.pay; desktop web routes to alipay.trade.page.pay; mini programs route to JSAPI; native apps route to alipay.trade.app.pay; deposits or credit stays route to pre-auth; subscriptions and recurring billing route to merchant collection. It also expects developers to fetch the relevant online docs with curl and recursively follow API pages before coding, so parameters, error codes, and samples are current. The guide covers RSA2 signing, production and sandbox gateways, server SDKs, and common errors.
Boundaries: It targets payment collection, not every Alipay use case
It does not cover WeChat Pay, UnionPay, transfers, reconciliation, or red packets, and it does not support merchant profit-sharing integration. Merchant collection currently supports periodic deductions only; user-initiated password-free payment is not supported. Use the sandbox first, and treat Alipay’s live documentation as the source of truth.
Use Cases
- Choose face-to-face payment and confirm the payment-code workflow when a store cashier scans a customer's Alipay code and notifies the backend of the result.
- Select order-code payment and pre-create an order when merchants generate a QR code for users to scan and pay in store or online product pages.
- Route H5 checkout in mobile browsers to WAP payment and verify gateway, signing, and callback handling before releasing a campaign page.
- Separate mini-program order creation from front-end trade payment calls when implementing JSAPI checkout inside Alipay so the order can be paid immediately.
Best For
- Backend engineers maintaining store POS systems who need to scan customer Alipay codes and handle async notifications for face-to-face checkout.
- Front-end engineers building product pages who need merchant-generated QR codes for users to scan and pay without redirecting away from the page.
- Full-stack engineers shipping H5 campaign pages who need mobile-browser checkout, gateway signing, callbacks, and sandbox testing before release with current parameters.
- Backend engineers implementing memberships who need to separate recurring subscription signing from later deductions and confirm periodic deduction limits before going live.
Related Skills
Guides Java Spring Boot backend development across REST APIs, data access, security, microservices, testing, deployment, and troubleshooting.
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Restores Lanhu designs to target framework code using schema JSON, design tokens, and image assets.
Automatically detects engineering or competition code, analyzes bugs, vulnerabilities, algorithm complexity, and edge cases, then produces risk-level findings with before/after fixes.