# preface

Please read firstBusiness Access Guidelines

# 1. to access

# 1.1 Request access

# Mode 1: MP access

inWeChat Public PlatformLog in the Mini Program, select the custom version of the transaction components, and apply for the opening function, enter the audit process. Businesses can also request access by calling the interface to open the function.


# API interface

callRequest access interface


# 1.2 Access query

# Method 1: MP View

# API interface

callQuery access interface


# 2. Upload Product

For some scenes, such as video number live, want to live in the window shelf goods with goods, you must first through the API to upload the goods to the transaction components in the platform

# 2.1 Get a list of categories and check whether the category for the product is required to apply for qualification in advance

callGet the class list interface

# 2.2 Upload Category Qualification

callUpload Class Interface

wait forCategory audit callback

# 2.3 Upload brand qualification

callUpload brand interface

wait forBrand Audit Callback

# 2.4 New products

callAdd commodity interface

wait forProduct review callback


# 3. Payment checkout

For some scenes, such as video number live, want to live in the window shelf goods with goods, you must first through the API to upload the goods to the transaction components in the platform

For details, please jumpScenario Access Guidelines

# 3.1 Open Payment Checksum for Development Environment

# Mini Program is developing branch process app.json Add the following parameter settings (this parameter is only valid for the development environment, after the code is released the parameter is invalid, that is, the official version of the Mini Program to open the payment checkout is only relevant to 3.2 below)

"usingShopPlugin": true


# 3.2 Determine if there is a need to pay the checkout (Sync legitimate orders to the WeChat side)

The front end of the business first passgetEnterOptionsSyncoronShowGet the Mini Program's current scene valuescene

Through againCheck if the scene value is within the payment checksum rangeThe interface judges the sceneDo you need to pay for verification?

# 3.3 New and Old Payment Verification Instructions

The old solution required synchronizing the order and getting the ticket through the backend api, and finally pulling up through the ticketwx.requestPaymentThe new scheme simply calls the order datawx.requestOrderPaymentcan then

Validation is based on the scene value, so there are two ways for developers to decide when to start validation:

  • Judge the scene situation, if the scene needs to be checked, call the checksum logic, otherwise not checksum, the subsequent scene value expansion, need to carry out real-time follow-up, otherwise it will lead to this scene can not be traded
  • Recommended to use the full order upload, do not need to judge according to the scene value, the subsequent scene value iteration, without change.

callSynchronous Order InterfaceNote that the order checks that the item in the order exists and that its status is on the shelf

After the call is successful, you get a ticket to pay for the checksum, which is in the base libraryrequestPaymentEnter the ticket field to pull up the cashier normally

    wx.requestPayment({
        timeStamp: '',
        nonceStr: '',
        package: '',
        signType: 'MD5',
        paySign: '',
        ticket: '', // Need to add ticket information
        success (nothing) { },
        fail (nothing) { }
    }) 

# New payment checkout: order passed directly to jsapi method

Merchant front end uses new checkout jsapi wx.requestOrderPaymentreplacewx.requestPayment

parameterorderInfoFormat PleaseJump to view

    wx.requestOrderPayment({
        timeStamp: '',
        nonceStr: '',
        package: '',
        signType: 'MD5',
        paySign: '',
        orderInfo: {...}, // Need to add order information
        success (nothing) { },
        fail (nothing) { }
    }) 

Note: Because the developer access stage does not open the video number scene, so the order cannot be intercepted, to achieve the debugging purpose, so in the developer tool to provide test scene value 10001, please set this scene, and pull up the cashier. If pull up failure, please checkorder_infoWhether to set, or print interface return for troubleshooting.

# 3.4 Order updates

Note that the orders that have been synchronized and are synchronized by 3.4.1 will be synchronized to the Mini Program Order Center.

# 3.4.1 Order Status Synchronization

callSynchronous Order Payment Result InterfaceSynchronization Payment Success Result


# 3.4.2 Synchronize after-sales information

Development of this need to produce after-sales orders after-sales information circulation, synchronization, if there is no after-sales, then do not need. callSynchronous after-sales interfaceSynchronous after-sales


# 3.5 Publish code to take effect on the online environment

After completing the interface docking and product upload, submit the code to the WeChat team for audit, after the audit can be released, at this time the payment verification officially takes effect