# Weixin Mini Program Plug-in function introduction
Plug-ins are functional components that can be added to Weixin Mini Program for direct use.A developer can develop a plug-in just like a Mini Program, for use by other Mini Programs. At the same time, Mini Program developers can use plug-ins directly within Mini Programs without repeated development, providing a richer service for users.
To develop plugins, read the Developing plugins section;To use plugins, please read the Using plugins section.
# Developing plug-ins
# Scope of openness and types of services
Scope of openness: businesses, the media, governments and other organizational bodies
The developer can select one of the selected categories of the current Weixin Mini Program account as the service category of the plug-in.The following are the categories of plug-in services that are currently open, with more categories to be opened gradually.
| Level 1 category | Category II | Special Notes |
|---|---|---|
| Logistics Services | Post, Handling, Receiving / Delivery, Express containers, Checking, Storage Services, Cargo Transportation | |
| Educational services | Infant and early childhood education, academic education (training institutions), academic education (schools), quality education, educational platforms, driving school training, education for special groups, study abroad, educational equipment | |
| Healthcare services | Medical services, Internet hospitals | Only medical class Weixin Mini Program can be used |
| Administration and people's livelihood | Traffic violations, museums, entry and exit, postal services, traffic management, urban roads, taxation, justice, meteorology, household administration, public security, environmental protection, civil affairs, education, water and electricity, Market supervision and management, sports / welfare lottery, inspection and quarantine, transportation, commerce, aviation, street committee, agriculture, forestry, livestock, marine, social science archives, emergency response, science, technology and geology, statistics, economic development and reform, government service halls, medical, sports, water, petitioning, urban management, Prisons and Drug Rehab, Customs, Housing and Construction, Human Resources, Culture, Social Security, People's Livelihood, Border Defense, National Security, Notary, Prosecution, Court, Discipline Inspection and Audit, Finance, Provident Funds, Party / Communist Party / Organization, Food Supervision and Administration, Press, Publication and Broadcasting, Intellectual Property, Tobacco Management, Internet Information | |
| financial sector | Credit reporting, insurance, banking, public funds, securities / futures, securities and futures investment advisory | Need to show the service provider on the plugin page, such as: The current service is provided by xxx |
| Transportation services | Bus / subway, coach, parking, car rental, car sharing, oil fuel filling station, bike riding, high-speed service, online car booking, air, train / high-speed rail, navigation map, water transportation, charging service | |
| Real Estate Services | Property management, housing agency, home improvement | |
| Life Services | Living expenses, Home Affairs, Beauty Services, Pets (non-hospital category), Wedding Services, Leisure & Recreation, Departments / Supermarkets / Convenience Stores, Job Search / Recruitment | |
| Food and Beverages | Restaurant queues, ordering platforms, takeaway platforms, food service establishments / food service management enterprises | |
| Tourism services | Visa processing, scenic area services, tourism tax refund, accommodation services, outbound WiFi, travel management units | |
| Entertainment | Other videos, radio, novels | 1.此类目插件首次提交代码审核,需经当地互联网主管机关审核确认,预计审核时长7天左右; 2.视频类目插件仅限非个人主体小程序使用; 3.插件暂未开放文娱-视频广场类目; 4.接入使用视频类目插件的小程序开发者,应当遵循 小程序使用“视频类插件”的相关规范 |
| Entertainment | Music, Audiobooks, Anime | |
| tool | Bookkeeping, Voting, Calendar, Weather, Memo, Office, Calculator, Network agent, HealthManagement, Quotation / Comparison, Invoice inquiry, Appointment / Registration, Picture processing, Info inquiry | |
| The business is self-employed | Clothing underwear, shoes and boots, luggage leather goods, overseas Amoy, maternal and child supplies, toys, 3C digital, Home appliances, beauty, personal care, jewelry and jade, fashion jewelry, glasses, clocks, outdoor sports, musical instruments, gardening / flowers, crafts, home textiles, office / stationery, farm equipment, pet food / supplies, home improvement / hardware / building materials, mechanical electronics, food and beverage | |
| E-commerce platform | E-commerce platform | |
| It technology | Basic telecommunications operators, telecommunications business agents | Use only with existing [it technology - basic teleporter] or [it technology - telecom service agent] categories Weixin Mini Program |
| Social contact | Notes, Q & A, Community / Forums, Making friends with strangers | 1. For the first time, the plug-in submits a code review and needs to be reviewed and confirmed by local Internet authorities, which is expected to take about 7 days. 2. This category of plugins is only available for social category Weixin Mini Program. |
| Social contact | live broadcast | 1. For the first time, the plug-in submits a code review and needs to be reviewed and confirmed by local Internet authorities, which is expected to take about 7 days. 2. Live broadcast plugins are only available for e-commerce platforms and some educational categories Weixin Mini Program |
| Business services | Legal services platform, exhibition services, advertising / design, PR / promotion / market research, general financial services, business management, environmental recycling / waste recycling, photography / expansion, software / website building / technology development, immigration abroad | |
| Sports | Sports Venue Services, Sports Training, Online Fitness | |
| Car Service | Car dealers / 4S shop, car manufacturers, maintenance, car prices / comparison, automotive supplies |
# Plug-in Development Access Process
The following is the plug-in development access process:
- Turn on the plug-in feature
- Fill out development information and develop
- Improve basic information
- Submitted for review, published
- Manage application for plug-in use
# Turn on the plug-in feature
Weixin Mini Program developers do not need to re-register the account, can directly open the plug-in function in the Mini Program management background, complete the basic information to complete the opening.
Open the entrance: Weixin Mini Program management background - Mini Program plug-in

Fill in the basic information of the plug-in, the basic information of the plug-in will be displayed in the plug-in application process, Weixin Mini Program basic information page.

# Fill out the development information and complete the development
After setting up the server domain name and token information for the plug-in, you can develop the plug-in in the developer tools.
Please see: Plugin Development Guide

# Improve basic information
Before submitting a review, verify that the plug-in name, plug-in avatar, plug-ins profile, and other information have been set up, and the plug-ins development documentation has been uploaded to facilitate the developer's access to the plug-int.
# Basic information is perfect.
Login Weixin Mini Program Management background - Mini Program plug-in - basic settings, confirm the name, avatar, profile, add, customer service and other information are complete.

# Plugin development documents are edited, uploaded
In order to facilitate Weixin Mini Program developers to quickly access plug-in services, plug-in developers can upload, publish plug-in development documents for access to view.
(1) Edit
In addition to the plug-in code itself, Weixin Mini Program developers can upload a plug-in development document.This document must be placed in thedocdirectory in the plugin root directory with the following directory structure:
doc
├── README.md // 插件文档,应为 markdown 格式
└── picture.jpg // 其他资源文件,仅支持图片
Among them, the picture source that cites cannot be a graph of a network, must be put below this directory.
(2) Upload
After editingREADME.md, you can preview plug-in documentation and upload plug-in documentation individually using the developer tools.
Upload Entry Location: README.md Bottom right corner of the document

(3) Publish
After you upload a document in the developer tool, the document is not released immediately.At this time, you can log in to the plug-in administration background using your account and password, and preview and publish plug-in documents in Weixin Mini Program plug-ins > Basic Settings.
Documents can be updated and modified multiple times after they are published.

# Plugin version management
Developers can upload code in the developer tools and complete plug-in development and debugging in the Weixin Mini Program plug-in development assistant.Please note: The plug-in is not currently supported in the Trial version
After uploading code in the Developer Tools, developers can manage plug-in versions in the "Weixin Mini Program Manage Background - Mini Programs Plug-ins - Development Management."

Before the plugin is released, it needs to be submitted to the Weixin Mini Program team for review, and then it can be released.
When submitting an audit, plug-in developers are required to fill in the following information: plug-in service category, label, preview, and feature description.

Plug-in service classes: Plug-in can select from the service classes that are currently passed by Weixin Mini Program.See Plugin Open Scope and Categories for the list of open categories.
Tags: Please fill in a tag related to the services provided by the plug-in.
Preview images: A preview of the plug-in can be uploaded and will be displayed on the plug-ins details page when published to help users understand the plug-int features in advance
Feature Dxplaination: To facilitate the review of the team experience and the review of plug-in features, developers are requested to complete a basic introduction and a explaination of how to use the plug-in.
# Use application management
Developers can handle plug-in access requests in the "Weixin Mini Program management background - Mini Program plug-in - application management."The plug-in developer can choose, within 24 hours, to "approve" or "refuse" the application to use the plug-in.

# Introduction to plug-in payment features
Payment capabilities can be used within the plug-in to help plug-in developers complete the service closure.

The following is the access process
Where the plug-in Weixin Mini Program opened WeChat ability to pay, check mini program opened Weixin Pay Guide
(2) Choose the appropriate payment mode based on the use scenario by reference to the following table
| Payment patterns | Scope of application | Typical use cases | Access Procedure |
|---|---|---|---|
| Service providers | The plug-in involves providing services such as merchandise sales and payment assistance to resident merchants, i.e. the merchandise sold is not provided by the plug-in developer. | The e-commerce platform provides store shelves, shopping carts and other services for established merchants; The restaurant platform provides offline merchants with the service of ordering meals and buying orders | 1. 申请成为微信支付服务商,查看 《微信支付服务商功能介绍》 、 《微信支付服务商接入指引》 2. 为商户创建子商户号 3. 绑定子商户号及插件所在的小程序账号,查看 “服务商商户号与AppID账号关联管理” 指引 4. 在插件内使用子商户号发起支付 |
(3) Submit a plug-in payment ability application in the plug-in management background, and after approval, you can use WeChat payment ability in the plug-in.

# Use a plug-in
Weixin Mini Program Developers can easily add plug-ins to their Mini Programs to enrich their services. When the user is using the Mini Program, they will be able to use the services provided by the plug-in within the Mini Program.
# Scope of Openness
All Weixin Mini Program. A plug-in uses a plug-in category that cannot exceed the scope of the currently open service types of the Mini Program, as shown in the list of open service categories .
# Access Procedure
Add a plug-in in the Weixin Mini Program admin background
Weixin Mini Program Developers can find the required plug-ins in the "Mini Program management background - settings - third-party services - plug-in management" and apply for use.After the plug-in developer has passed it within 24 hours, the Mini Program developer can use the plug-ins within the Mini Program.

Using plug-ins in Weixin Mini Program code