# preface

Please read the Service Access Guidelines

# 1. to access

# 1.1 Request Access

# Mode 1, MP access

On the WeChat public platform log in to Weixin Mini Program, select the custom trading component, and request the activation of the feature to enter the audit process.Merchants can also request the activation of the function by calling the interface requesting access.



# Mode 2, API interface

Call request access interface



# 1.2 Access query

# Way 1, MP view

# Mode 2, API interface

Call to query access interface



# 2. Upload merchandise

For certain scenarios, such as live streaming on WeChat Channels, you need to upload your products to the transaction component middleware via API beforehand in order to conduct live sales in the storefront.

# 2.1 Get a list of categories to check whether the categories corresponding to the goods require prior qualifications

Call to get a list of categories interface

# 2.2 Upload category qualifications

Calling the upload category interface

Wait for category audit callback

# 2.3 Upload Brand Accreditation

Call upload brand interface

Waiting for Brand Audit Callback

# 2.4 New commodities

Call to add a product interface

Waiting for Product Audit Callback



# 3. Payment Verification

For certain scenarios, such as live streaming on WeChat Channels, you need to upload your products to the transaction component middleware via API beforehand in order to conduct live sales in the storefront.

Please jump to for detailed scenario instructions

# 3.1 Development environment opens payment validation

# Weixin Mini Program Add the following parameter setting to apagejson in the development branch process (this parameter only works for the development environment and expires after the code is released, i.e. whether or not the official Mini Program opens payment validation is only relevant to 3.2.)

"usingShopPlugin": true;

# 3.2 Determine whether a controlled merchant order is required (synchronize the compliant order to the WeChat side)

The merchant front end first obtains the Weixin Mini Program current scene valuescene by [getEnterOptionsSync](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/life-cycle/wx.getEnterOptionsSync.html) or [onShow](https://developers.weixin.qq.com/miniprogram/dev/reference/api/App.html#onLaunch-Object-object)

The interface then checks whether the scene value is within the payment validation range and the interface determines whether thescenerequires payment validation

# 3.3 Statement of payment verification

The purpose of payment verification is to ensure the reliability of data during the use of transaction components, while safeguarding the rights and interests of users.

You need to call to synchronize the order interface . The goods in the order need not necessarily be from the catalog, but you need to try to follow the catalog's out_product_id,out_sku_idtransmissions, which affect digital statistics.

1, non-secondary merchant orders (order.fund_type = 0) need to synchronize the order through the background API, and synchronize the payment results after the user pays.

2, secondary merchant number order (order.fund_type = 1) needs to obtain payment parameters from the transaction component (no longer obtain paymentparameters from WeChat payments), Weixin Mini Program new cash registers are used on the front endjsapi wx.requestOrderPayment

Check the scene value :

Note: Since the WeChat Channels scenario is not available during the developer access phase, the payment verification cannot be triggered for debugging purposes, so a test scenario value of 10001 is provided in the developer tools; please set this scenario and open the checkout interface; if the checkout interface opens successfully, it indicates that the payment verification can be passed.

After the simulated scene value test, if payments are normal, the official version can be released, and a live broadcast of a designated audience can be launched to verify the online payment process.

# 3.4 Order flows

Call Order shipment , Order confirm receipt ,Generate an after-sales Complete the order status flow.

# 3.5 Publish the code and take effect on the online environment

After the completion of the interface docking and product upload, submit the code to the WeChat team for review, after the review can be released, at this time the payment verification is officially effective