# Introduction

This document introduces several modes by which merchants can use the Weixin E-invoice feature. Merchants can choose a mode that best suits them and make corresponding preparations (obtaining accounts and permissions, etc.) so that they can call relevant APIs for development based on their business scenarios. Merchants can refer to the decision tree below to quickly determine the mode that best suits them.

模式决策树

# 1. Merchants Who Already Can Issue E-Invoices

Merchants who already can issue e-invoices simply need to activate relevant permissions to apply the Weixin e-invoice solution. Then, they can issue e-invoices to users who grant authorization. Based on the construction of their invoicing systems, these merchants can choose the "Merchant + Invoicing Platform" mode or the "Self-deployed Platform" mode. The following provides the definitions and workflows of the two modes, and relevant preparations.

# 1.1 Merchant + Invoicing Platform

In the Merchant + Invoicing Platform mode, the merchant is responsible for obtaining the invoicing authorization from users and the invoicing platform is responsible for issuing e-invoices and adding them to users' Cards & Offers. This mode is applicable to merchants who authorize a third-party invoicing platform to manage e-invoice issuance for them, which can effectively reduce the merchant's development workload. The workflow of Merchant + Invoicing Platform is shown in the figure below:
Workflow of Merchant + Invoicing Platform Mode

Necessary preparations
(1) Go to the Weixin Official Accounts Platform to apply for an Official Account, and get appid and appsecret for calling APIs.
(2) Ask the invoicing platform for the s_pappid.

Applying for merchant API permissions (1) Log in to the Official Accounts Platform and click the Add Feature Plug-in button in the Features menu on the left. Left-side Menu
(2) Find E-invoice in the list of available feature plug-ins, and click it to go to the e-invoice plug-in introduction page. Activate Plug-in
(3) Click Activate to activate the e-invoice feature plug-in. After activated, the E-invoice feature will be displayed in the Features menu on the left. Left-side Entry
(4) Enter the E-invoice feature page and click Activate Permissions. Activate Permissions
(5) Read the user agreement and confirm to activate permissions. Activate Permissions toast
(6) When permissions are activated, the permission button will be changed to "Activated". Permissions Activated

Debugging APIs
After completing the above preparations, you can start development according to the "Merchant + Invoicing Platform" Mode Description.

# 1.2 Self-deployed Platform

In the Self-deployed Platform mode, the merchant is responsible for obtaining the invoice authorization from users as well as issuing e-invoices and adding them to users' Cards & Offers. As e-invoice PDFs are directly generated on the merchant's self-deployed invoicing platform, the merchant is able to complete the entire process efficiently. The workflow of Self-deployed Platform is shown in the figure below:

Necessary preparations
(1) Go to the Weixin Official Accounts Platform to apply for an Official Account, and get appid and appsecret for calling APIs.
(2) Obtain the access_token. For more information, see "Obtaining access_token".
(3) Obtain the ticket. For more information, see "Obtaining Ticket".
(4) Configure callback for the Official Account. For more information, see "Receiving Callbacks".

Applying for merchant API permissions (1) Log in to the Official Accounts Platform and click the Add Feature Plug-in button in the Features menu on the left. Left-side Menu
(2) Find E-invoice in the list of available feature plug-ins, and click it to go to the e-invoice plug-in introduction page. Activate Plug-in
(3) Click Activate to activate the e-invoice feature plug-in. After activated, the E-invoice feature will be displayed in the Features menu on the left. Left-side Entry
(4) Enter the E-invoice feature page and click Activate Permissions. Activate Permissions
(5) Read the user agreement and confirm to activate permissions. Activate Permissions toast
(6) When permissions are activated, the permission button will be changed to "Activated". Permissions Activated

Debugging APIs
After completing the above preparations, you can start development according to the "Self-deployed Platform" Mode Description.

# 2. Merchants Who Cannot Issue E-invoices Yet

For merchants who cannot issue e-invoices yet, Weixin provides a range of invoicing capabilities for merchants to activate the E-invoice feature on the Weixin Official Accounts Platform easily on their own, and to use standardized API requests to issue e-invoices. The following describes the process of merchants with verified Official Accounts Platform accounts activating the e-invoice feature.

# 2.1 Activating the E-invoice Feature via Weixin's "Invoicing Capabilities"

Necessary preparations
(1) Apply for an account on the Official Accounts Platform.
(2) Complete verification for the Official Accounts Platform account.
(3) Prepare the business license, ID card of the tax contact person, and other certificates used to complete necessary forms.

Activation process
(1) Log in to the Official Accounts Platform and click the Add Feature Plug-in button in the Features menu on the left. Left-side Menu
(2) Find E-invoice in the list of available feature plug-ins, and click it to go to the e-invoice plug-in introduction page. Activate Plug-in
(3) Click Activate to activate the e-invoice feature plug-in. After activated, the E-invoice feature will be displayed in the Features menu on the left. Left-side Entry
(4) Enter the E-invoice feature page, and click Purchase Package in the Invoice Package Management section. Then, select an invoicing provider and package based on the merchant's annual invoicing volume and invoicing time requirements. Purchase Entry Select Package
(5) After completing step (4), fill out a ticket and upload qualification documents. Fill out the Ticket
(6) After the ticket is submitted and approved, the ticket enters the "To Be Paid" status, and you can complete the payment for the invoicing platform. To Be Paid
(7) Complete the payment by making an Offline transfer to the bank account provided by the invoicing platform. Then, enter the bank transfer serial number and submit a photo of payment proof so that the invoicing platform can confirm the payment. Enter the Bank Transfer Serial No.
(8) After confirming the payment, the invoicing platform will start to issue CAs and perform other operations. The merchant only needs to follow the internal messages on the Official Accounts Platform and ticket status. When the ticket status changes to "Completed", you can debug the APIs and issue e-invoices according to the Weixin "Invoicing Capabilities" Mode Description.

Debugging APIs
After completing the above preparations, you can start development according to the Weixin "Invoicing Capabilities" Mode Description.