{"id":15286051,"url":"https://github.com/thenorthmemory/wechatpay-openapi","last_synced_at":"2026-06-01T02:05:46.473Z","repository":{"id":39831290,"uuid":"278843969","full_name":"TheNorthMemory/wechatpay-openapi","owner":"TheNorthMemory","description":"https://thenorthmemory.github.io/wechatpay-openapi/","archived":false,"fork":false,"pushed_at":"2024-10-30T03:50:24.000Z","size":2503,"stargazers_count":36,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T06:26:17.950Z","etag":null,"topics":["openapi","wechatpay","wechatpay-apiv2","wechatpay-apiv3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheNorthMemory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-11T11:00:44.000Z","updated_at":"2024-10-30T03:50:27.000Z","dependencies_parsed_at":"2024-02-04T12:27:57.502Z","dependency_job_id":"a889fa51-42aa-4b02-859d-64c6f0329ff4","html_url":"https://github.com/TheNorthMemory/wechatpay-openapi","commit_stats":{"total_commits":320,"total_committers":1,"mean_commits":320.0,"dds":0.0,"last_synced_commit":"5cd0c1d9945460c709df8cce49e060edad0d2284"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNorthMemory%2Fwechatpay-openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNorthMemory%2Fwechatpay-openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNorthMemory%2Fwechatpay-openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNorthMemory%2Fwechatpay-openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheNorthMemory","download_url":"https://codeload.github.com/TheNorthMemory/wechatpay-openapi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675597,"owners_count":20977376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openapi","wechatpay","wechatpay-apiv2","wechatpay-apiv3"],"created_at":"2024-09-30T15:10:17.260Z","updated_at":"2026-03-01T04:13:11.994Z","avatar_url":"https://github.com/TheNorthMemory.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 微信支付OpenAPI\n\n整理自[官方文档中心](https://pay.weixin.qq.com/wiki/doc/apiv3/index.shtml)\n\n[![GitHub actions](https://github.com/TheNorthMemory/wechatpay-openapi/workflows/CI/badge.svg)](https://github.com/TheNorthMemory/wechatpay-openapi/actions)\n[![Packagist Stars](https://img.shields.io/packagist/stars/iwechatpay/openapi)](https://packagist.org/packages/iwechatpay/openapi)\n[![Packagist Downloads](https://img.shields.io/packagist/dm/iwechatpay/openapi)](https://packagist.org/packages/iwechatpay/openapi)\n[![Packagist Version](https://img.shields.io/packagist/v/iwechatpay/openapi)](https://packagist.org/packages/iwechatpay/openapi)\n[![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/iwechatpay/openapi)](https://packagist.org/packages/iwechatpay/openapi)\n[![Packagist License](https://img.shields.io/packagist/l/iwechatpay/openapi)](https://packagist.org/packages/iwechatpay/openapi)\n\n## 业务标签\n\n| 名称 | 直连模式 | 服务商模式 |\n| --- | :---: | :---: |\n| 基础支付 | ✔️ | |\n| 基础支付∙服务商模式 | | ✔️ |\n| 基础支付∙合单 | | ✔️ |\n| 基础支付∙账单 | ✔️ | ✔️ |\n| 基础支付∙退款 | ✔️ | ✔️ |\n| 刷脸支付 | | ✔️ |\n| 免密支付 | ✔️ | ✔️ |\n| 微信分付 | ✔️ | ✔️ |\n| 资金应用∙分账 | | ✔️ |\n| 资金应用∙转账 | ✔️ | |\n| 资金应用∙转账∙QQ钱包 | ✔️ | |\n| 资金应用∙转账∙用户确认模式 | ✔️ | |\n| 资金应用∙转账∙服务商模式 | | ✔️ |\n| 资金应用∙转账∙银行模式 | | ✔️ |\n| 收付通∙进件 | | ✔️ |\n| 收付通∙注销 | | ✔️ |\n| 收付通∙支付 | | ✔️ |\n| 收付通∙合单 | | ✔️ |\n| 收付通∙合单代扣 | | ✔️ |\n| 收付通∙个人收款 | | ✔️ |\n| 收付通∙补差 | | ✔️ |\n| 收付通∙分账 | | ✔️ |\n| 收付通∙退款 | | ✔️ |\n| 收付通∙充值 | | ✔️ |\n| 收付通∙余额 | | ✔️ |\n| 收付通∙提现 | | ✔️ |\n| 收付通∙赔付 | | ✔️ |\n| 收付通∙售后赔付 | | ✔️ |\n| 收付通∙保险理赔 | | ✔️ |\n| 收付通∙账单 | | ✔️ |\n| 收付通∙跨境 | | ✔️ |\n| 平台保证金∙赔付用户 | | ✔️ |\n| 平台保证金∙赔付商户 | | ✔️ |\n| 平台保证金∙赔付用户运费 | | ✔️ |\n| 平台保证金∙赔付保司保费 | | ✔️ |\n| 服务商∙进件 | | ✔️ |\n| 会员卡 | ✔️ | ✔️ |\n| 会员卡∙基础功能 | ✔️ | ✔️ |\n| 会员卡∙运营投放 | ✔️ | ✔️ |\n| 会员卡∙权益设置 | ✔️ | ✔️ |\n| 会员卡∙会员有礼 | ✔️ | ✔️ |\n| 支付分 | ✔️ | |\n| 支付分∙免确认模式 | ✔️ | |\n| 支付分∙免确认模式∙普通授权 | ✔️ | |\n| 支付分∙免确认模式∙预授权 | ✔️ | |\n| 支付分∙签约计划 | ✔️ | ✔️ |\n| 支付分∙先享卡 | ✔️ | |\n| 支付分∙先用后付 | ✔️ | ✔️ |\n| 支付分∙先享后付 | ✔️ | |\n| 支付分∙智慧零售 | ✔️ | |\n| 支付分∙停车服务 | ✔️ | ✔️ |\n| 支付分∙服务商模式 | | ✔️ |\n| 支付分∙服务商模式∙免确认 | | ✔️ |\n| 支付分∙机构模式 | | ✔️ |\n| 支付分∙海外机构模式 | | ✔️ |\n| 品牌小店营销 | ✔️ | ✔️ |\n| 微信寄快递 | | ✔️ |\n| 委托代扣 | ✔️ | ✔️ |\n| 委托代扣∙保险业 | ✔️ | |\n| 校园轻松付 | | ✔️ |\n| 教育续费通 | ✔️ | ✔️ |\n| 学生卡身份权益 | ✔️ | |\n| 爱心餐 | ✔️ | ✔️ |\n| 乘车服务 | ✔️ | ✔️ |\n| ETC授权扣费 | ✔️ | ✔️ |\n| 电动自行车行业代扣 | ✔️ | ✔️ |\n| 出租车电子发票 | | ✔️ |\n| 租用充电宝∙隔夜归还 | ✔️ | |\n| 运营工具∙代金券 | ✔️ | ✔️ |\n| 运营工具∙消费金 | ✔️ | |\n| 运营工具∙商家券 | ✔️ | ✔️ |\n| 运营工具∙委托营销 | ✔️ | ✔️ |\n| 运营工具∙支付有礼 | ✔️ | ✔️ |\n| 运营工具∙消费卡 | ✔️ | ✔️ |\n| 运营工具∙用工卡 | | ✔️ |\n| 运营工具∙通用接口 | ✔️ | ✔️ |\n| 经营工具∙智慧商圈 | ✔️ | ✔️ |\n| 经营工具∙支付即服务 | ✔️ | ✔️ |\n| 经营工具∙点金计划 | | ✔️ |\n| 经营工具∙连锁品牌∙分账 | ✔️ | ✔️ |\n| 经营工具∙连锁品牌∙门店 | ✔️ | ✔️ |\n| 经营工具∙微信点餐 | | ✔️ |\n| 经营工具∙电子发票 | ✔️ | ✔️ |\n| 经营工具∙电子小票 | | ✔️ |\n| 经营工具∙小票机 | | ✔️ |\n| 营销工具∙收款有礼 | ✔️ | ✔️ |\n| 营销工具∙代扣切卡 | ✔️ | ✔️ |\n| 营销工具∙周周惠 | | ✔️ |\n| 商家充值 | ✔️ | ✔️ |\n| 结算规则管理 | | ✔️ |\n| 风险管理 | ✔️ | ✔️ |\n| 风险合规∙消费者投诉 | ✔️ | ✔️ |\n| 风险合规∙商户违规通知 | ✔️ | ✔️ |\n| 风险合规∙开户意愿确认 | ✔️ | ✔️ |\n| 风险合规∙不活跃商户身份核实 | | ✔️ |\n| 通用接口 | ✔️ | ✔️ |\n| 跨境 | ✔️ | ✔️ |\n| 跨境∙进件 | | ✔️ |\n| 跨境∙报关 | ✔️ | ✔️ |\n| 跨境∙支付 | ✔️ | ✔️ |\n| 跨境∙退款 | ✔️ | ✔️ |\n| 跨境∙分账 | ✔️ | ✔️ |\n| 跨境∙代扣 | ✔️ | ✔️ |\n| 跨境∙H5权限 |  | ✔️ |\n| 沙箱环境 | ✔️ | ✔️ |\n| APIv2∙人脸支付 | | ✔️ |\n| APIv2∙基础支付 | ✔️ | ✔️ |\n| APIv2∙基础支付∙合单 | ✔️ | ✔️ |\n| APIv2∙基础支付∙账单 | ✔️ | ✔️ |\n| APIv2∙基础支付∙退款 | ✔️ | ✔️ |\n| APIv2∙资金应用∙分账 | ✔️ | ✔️ |\n| APIv2∙资金应用∙红包 | ✔️ | ✔️ |\n| APIv2∙资金应用∙付款 | ✔️ | ✔️ |\n| APIv2∙车主平台 | ✔️ | ✔️ |\n| APIv2∙乘车码代扣 | ✔️ | ✔️ |\n| APIv2∙免押租借 | ✔️ | |\n| APIv2∙免押速住 | ✔️ | |\n| APIv2∙酒店押金 | ✔️ | ✔️ |\n| APIv2∙委托扣款 | ✔️ | ✔️ |\n| APIv2∙代金券 | ✔️ | ✔️ |\n| APIv2∙小微 | | ✔️ |\n| APIv2∙风控 | ✔️ | ✔️ |\n| APIv2∙报关 | ✔️ | ✔️ |\n| APIv2∙通用 | ✔️ | ✔️ |\n| APIv2∙企微∙红包 | ✔️ | |\n| APIv2∙企微∙付款 | ✔️ | |\n\n## PHP\n\n推荐使用 `composer` 安装\n\n`composer require --dev iwechatpay/openapi`\n\n## IDE提示\n\n[工作原理及介绍见这里](https://developers.weixin.qq.com/community/develop/article/doc/000a0ce867842092f8cc65e5356013)\n\n![vscode screenshot](./.github/how-it-works-screenshot-1.png)\n\n![vscode screenshot](./.github/how-it-works-screenshot-2.png)\n\n![vscode screenshot](./.github/how-it-works-screenshot-3.png)\n\n## 特殊URI语法规则\n\n| 源URI | 模版变量 | 值 |\n| --- | --- | --- |\n| `secapi/mch/addInstitutionsub` | `{addinstitutionsub}` [^1] | `addInstitutionsub` |\n| `secapi/mch/modifyInstitutionsub` | `{modifyinstitutionsub}` [^1] | `modifyInstitutionsub` |\n| `secapi/mch/queryInstitutionsub` | `{queryinstitutionsub}` [^1] | `queryInstitutionsub` |\n| `v3/applyment4sub/applyment/` | `{empty}` [^2] | |\n| `v3/ecommerce/applyments/` | `{empty}` [^2] | |\n\n[^1]: 源URI上含有`I`大写字符，需要用模版变量构造\n[^2]: 源URI末尾以`/`结尾，需要值为用空的模版变量构造，`{empty}`为`RFC6570`Level3保留语法\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenorthmemory%2Fwechatpay-openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthenorthmemory%2Fwechatpay-openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthenorthmemory%2Fwechatpay-openapi/lists"}