wechatpay-medical-insurance-payment

Guide WeChat Pay Medical Insurance 2.0 mixed payment integration with order creation, callbacks, and troubleshooting.

323|23|Updated Mar 23, 2026
One-click install
npx skills add https://github.com/wechatpay-apiv3/wechatpay-skills --skill wechatpay-medical-insurance-payment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wechatpay-medical-insurance-payment
Source: https://github.com/wechatpay-apiv3/wechatpay-skills/tree/main/wechatpay-medical-insurance-payment
Command: npx skills add https://github.com/wechatpay-apiv3/wechatpay-skills --skill wechatpay-medical-insurance-payment

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides developers to integrate WeChat Pay Medical Insurance (移动医保支付2.0) end-to-end, including mixed payment order creation, payment invocation, callbacks, refund notification, querying, and failure troubleshooting across merchant and service-provider modes.

Core Features & Use Cases

  • 产品选型:根据订单类型(挂号/诊间/住院/药店/互联网医院)与支付形态(纯医保/纯自费/医保自费混合)判断应走哪条接入与字段约束。
  • 示例代码:提供医保自费混合下单、订单查询、医保退款通知、拉起医保支付(JSAPI/小程序)、以及混合收款成功回调等官方接口示例的检索路径与讲解框架。
  • 业务知识速查:覆盖 mix_pay_type 字段约束、金额公式校验、医保电子凭证授权链路、回调验签解密、以及订单状态流转规则(如 MIX_PAY_CREATED/SUCCESS/FAIL 等)。
  • 质量评估:按“通用安全雷达 + 医保专属雷达”检查金额、敏感字段加密、字段联动、幂等与查单兜底、回调应答时限等上线风险点。
  • 问题排查:以错误码 TOP、官方报错文案精准命中、以及常见问题路径快速定位:前端拉起失败、下单失败、回调收不到/签名失败、金额校验失败、医保局业务错误与串单等。

Quick Start

Use this Skill to help me接入“移动医保支付2.0”,并基于我的模式(商户/服务商)、订单类型与支付形态,给出对应接口接入步骤、字段约束校验点、以及我遇到的报错的排查流程和下一步怎么查单。

Frequently Asked Questions about wechatpay-medical-insurance-payment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate WeChat Pay medical insurance mixed payment in a mini program?

To integrate WeChat Pay medical insurance mixed payment, create a mixed payment order, invoke JSAPI or mini program payment, verify callback signatures, and query order status using specific order_type and mix_pay_type field constraints.

Why does my medical insurance payment callback fail signature verification?

Medical insurance payment callback signature verification fails when secure encryption handling is improperly configured or callback response time limits are exceeded. Use the skill's reference docs to verify decryption keys and enforce safe idempotency.

What is the correct mix_pay_type field constraint for WeChat Pay medical insurance orders?

The mix_pay_type field constraint defines the payment form as pure medical insurance, pure self-pay, or mixed. Selecting the correct value enforces required field constraints and amount formulas for registration, clinic, inpatient, or pharmacy orders.

How to troubleshoot WeChat Pay medical insurance order creation failures?

Troubleshoot medical insurance order creation failures by checking error codes, matching official error messages, and verifying amount formula validation. Follow the operational troubleshooting path to diagnose merchant or service-provider setup issues.

Can I use WeChat Pay JSAPI for both pure self-pay and medical insurance mixed payment?

Yes, WeChat Pay JSAPI supports both pure self-pay and medical insurance mixed payment. Determine the correct order_type and mix_pay_type to ensure proper field linkage, amount validation, and order status transitions like MIX_PAY_CREATED or SUCCESS.

When should I use active order querying instead of relying on WeChat Pay medical insurance callbacks?

Use active order querying as a fallback when callbacks are delayed or missed. Enforce safe idempotency and implement active query fallbacks to ensure reliable order status synchronization for medical insurance mixed payments.