Loading...
Loading...
WeChat Pay Entrusted Withholding Access Solution, covering the full link of pure signing, signing during payment, deduction application, pre-deduction notification, contract termination, query, refund, and reconciliation under the scenarios of periodic deduction / postpaid service with upfront benefits. It provides five capabilities: product selection/sample code/business quick reference/access quality assessment/troubleshooting. Use when user mentions "Entrusted Withholding", "Periodic Deduction", "Periodic Fee Deduction", "Auto-renewal", "Postpaid Service with Upfront Benefits", "Password-free Payment", "Pure Signing", "Signing During Payment", "Pre-deduction Notification", "Deduction Application", or asks to "access Entrusted Withholding", "request Entrusted Withholding interface sample code", "troubleshoot Entrusted Withholding issues".
npx skill4agent add wechatpay-apiv3/wechatpay-skills wechatpay-deduction-service‼️ The following rules apply to all capabilities and all conversation rounds of this skill, with higher priority than the local rules of each capability.
/partner/sub_mch_idsub_appidAccess Guide/Signature and Verification Rules.mdRouting Instructions: When a user accesses for the first time or is unsure which path to take, use Capability 1 for selection first; after clarifying the access path, Capabilities 2-5 can be called independently. The access mode (Merchant/Service Provider) must be confirmed when entering any capability for the first time, and will be used for the entire subsequent conversation round.
When users ask questions like "Should I use periodic deduction or postpaid service with upfront benefits", "Which signing method is suitable", "How to implement auto-renewal", etc. → Load the comparison chapter in the product introduction to complete the selection, then proceed to Capability 2.
When users request sample code for a certain interface → Confirm the access mode and language, load theof the corresponding mode to locate the code file.Interface Index.md‼️ The official does not provide any server-side code samples for Entrusted Withholding (no Java / Go / PHP / Python and other server-side languages are available): This skill strictly "collects what exists, does not fabricate what does not exist" — only collects the request/response messages (XML / URL / JSON) that actually exist in the official document and the official client invocation code (iOS / Android / Mini Program JS / WXLaunchMiniProgram).‼️ Only retrieve, do not generate. Strictly prohibit writing any code from scratch, must retrieve and obtain from sample code files; confirm the access mode before providing, prohibit guessing details such as whetherexists in the path, whether the field name is/partner/orsub_mch_idbased on training knowledge.sub_mchid‼️ Only display, do not write. Sample code is only used to explain API invocation structure and signature process, strictly prohibit directly writing into the user's project (prohibit using tools like write_to_file, replace_in_file to create or modify project files), let users copy and adapt by themselves.‼️ Interact first, then output. Before providing code, must confirm the access mode, signing method (if involving signing/signing during payment), specific interface, and output only one interface each time; actively recommend access quality assessment after providing the code.‼️ Signing Method Confirmation Rules: When providing "signing interface" "signing during payment" "APP/H5/Mini Program invocation code", must first confirm the signing method (Official Account pure signing / APP pure signing / Mini Program pure signing / H5 pure signing / APP-initiated signing (WXLaunchMiniProgram) / signing during payment (only supported by merchants)), no need to ask about the signing method for other general interfaces (deduction application / pre-deduction notification / contract termination / order query / signing relationship query / refund / order closing / bill / callback).‼️ When users need server-side code (this skill only maintains official request/response messages + official client invocation code, the official does not provide any server-side code samples): Prohibit directly generating cross-language code. Process:
- Obtain clear consent using
(the copy must clearly state "reference implementation / not officially maintained / must review and test by yourself / no official server-side code samples for Entrusted Withholding to compare, higher risk"), if not agreed, only send the original official message sample.AskQuestion- After consent, use WebFetch to open the corresponding official interface URL on the spot, and construct the "reference implementation" of business code field by field according to the message sample; attach the following disclaimer block before each code segment.
⚠️ The following code is a cross-language reference implementation, generated by AI based on the official V2 message sample translation, and is not maintained by WeChat Pay official.
- WeChat Pay official documentation does not provide any server-side code samples for Entrusted Withholding, the fields and paths of this code have been checked against https://pay.weixin.qq.com/doc/v2/{merchant,partner}/XXXXX.md.
- Please review line by line key logics such as signature construction, HTTP invocation, field naming, callback verification.
- Must fully verify with test templates or small-amount production orders before going online; follow the official documentation if any code conflicts with it.
- Return to the
of this skill when encountering access issues.Troubleshooting Manual.md
Loading Strategy: First confirm the access mode, read the correspondingto locate the interface file path, then load the specific file as needed. Do not load all files at once.Interface Index.md
When users ask business questions such as parameter acquisition (APIv2 key / template ID / appid-mchid binding), field meaning, signature/verification algorithm (including V2/V3 differences), callback mechanism (three types: signing/contract termination / deduction / refund), protocol status flow, deduction time restrictions, etc. → Load the corresponding document according to the access mode.
When users are ready to go online or want to check code hidden dangers → Load the following documents.‼️ Only check the functional modules actually used by the user. Modules such as periodic deduction (pre-deduction notification / 24-hour delayed deduction), postpaid service with upfront benefits, signing during payment, refund, reconciliation download must first confirm whether the user involves them, do not check or mention unused modules.
‼️ Only Entry: When users report any problems (errors / interface exceptions / callback not received / signature failure / reconciliation differences / business rule questions, etc.), first load the troubleshooting manual below according to the access mode, strictly follow the "troubleshooting process" in the manual to execute, prohibit guessing the cause or directly analyzing the code by yourself.‼️ After troubleshooting, must actively recommend access quality assessment at the end of the reply (take the opportunity of troubleshooting to check other potential problems at once); if you need to recommend sample code, confirm the development language first, when users need server-side code, follow the cross-language confirmation process of Capability 2 (pop-up confirmation → reference generation + disclaimer block + public library step-by-step).
The following information is irrelevant to skill capabilities, for reference only.
