Feature Description

Shake-Nearby Red Packet APIs are provided for offline merchants to allow the users get the red packets issued by the merchants at merchants' physical stores or other offline places. The red packets cannot be forwarded or shared online.

Developers can develop the Shake Red Packet feature with the APIs. This feature:

Allows you to choose using the template loading page or using the custom HTML5 page to invoke the Weixin native red packet page (For more information, see the use_template field in "Create Red Packet Campaign" API. 1: use the template; 2: use the custom HTML5 page)

Enables users to open red packets on the native red packet pages, without the need to issuing red packets via the Official Account messages.

Giving users the option to follow the Official Accounts (not applicable to shareable red packets).

Supports configuring redirect URL on the completion page to redirect users to the merchant's other custom HTML5 pages.

A single user can only get one red packet in a campaign.

Interaction Process for Users

Red Packet Component API Workflow

  1. Log in to the Shake-Nearby Merchants Platform https://zb.weixin.qq.com, go to Developer Support, and then apply for activating the Shake Red Packet component APIs;

  2. Pre-order red packets by calling the WeChat Pay API to set such information as amount of red packets to be issued and the number of red packet recipients, and generate red packet tickets;

  3. Create a red packet campaign and enter the red packet information by calling the Shake-Nearby Platform APIs, and input the red packet tickets generated when pre-ordering the red packets;

  4. Trigger the operation of drawing red packets by calling JSAPI in the page displayed after a user taps Shake > Nearby. The user who succeeds in drawing a red packet can open the packet.

When the above APIs are called, the Official Account of the red packet provider should be same as that of the red packet issuer.

Notes:  Red packet provider: The merchant represented by the parameter wxappid passed via the "Pre-order Red Packet" API  Red packet issuer: The merchant who creates the red packet campaign, enters the red packet information, and issues the red packets by calling the red packet APIs.