1, when the merchant calls the interface, by assigning the object and sending the amount of the way to distribute red envelopes, this way, allows the merchant to flexibly apply to a variety of rich activities of the scene
2, after receiving the red envelope, the user's funds directly into the micro-letter change, avoid the complicated process of accepting the prize, to the user micro-letter to pay the original fluent experience
The rules for the sending of micro-letter red Envelopes
The number of packets per minute shall not exceed 1800;
Beijing time 0:00-8:00 does not trigger the donation of red envelopes (if the above rules do not meet your needs, please send email to wxhongbao@tencent.com for upgrade guidelines)
The amount of a single red envelope is between [1.00 yuan, 200.00 yuan];
The same red packet can only be sent to a user (if the above rules do not meet your needs, please email to wxhongbao@tencent.com to obtain the upgrade guidelines)
The number of packets per minute shall not exceed 1800;
Beijing time 0:00-8:00 does not trigger the donation of red envelopes (if the above rules do not meet your needs, please send email to wxhongbao@tencent.com for upgrade guidelines)
The amount of a single red envelope is between [1.00 yuan, 1000.00 yuan];
The average amount of each red envelope in a fission combination is between [1.00 yuan, 200.00 yuan];
The same group of fission red envelopes can only be sent to a user; (if the above rules do not meet your needs, please email to wxhongbao@tencent.com for upgrade guidelines)
Interface Detailed description
1. Description of Red envelope payment
For enterprises to individual users of micro-trust to send a fission red envelopes
Currently supports the release of the specified amount of fissile red envelopes to OpenID, the designated micro-trust user. (Get OpenID See micro-trust public Platform Developer Documentation: Web page authorization to get user profile)
When a merchant invokes an interface, it issues a set of red envelopes by specifying the amount sent and the way a sender is assigned.
Designated to send the object to receive the red envelope, the funds directly into the micro-letter change, to bring the user micro-letter to pay the original fluent experience
Specifies that the sending object can share the remaining red envelopes in the portfolio to friends, friends can continue to receive, form the spread effect, enlarge the Enterprise brand value
2. Interface Call Request description
Request URL |
Https://api.mch.weixin.qq.com/mmpaymkttransfers/sendgroupredpack |
Whether a certificate is required |
Yes (please refer to Merchant Certificate for certificate and usage instructions) |
Request method |
POST |
Field name |
Field |
must fill |
Sample Value |
type |
Description |
Random string |
Nonce_str |
Is |
5k8264iltkch16cq2502si8znmtm67vs |
String (32) |
Random string, no longer than 32 bits |
Signature |
Sign |
Is |
C380bec2bfd727a4b6845133519f3ad6 |
String (32) |
See Signature generation algorithm for details |
Merchant Order Number |
Mch_billno |
Is |
10000098201411111234567890 |
String (28) |
Merchant Order Number (each order number must be unique)
Composition: mch_id+yyyymmdd+10 digits that cannot be duplicated within a single day.
The interface is reentrant based on the merchant order number, and can be called again if a time-out occurs.
|
Merchant number |
mch_id |
Is |
10000098 |
String (32) |
The merchant number of the micro-credit payment distribution |
Sub Merchant number |
sub_mch_id |
Whether |
10000090 |
String (32) |
Sub-merchant number of micro-credit payment allocation, required in reception mode |
Public account AppID |
Wxappid |
Is |
wx8888888888888888 |
String (32) |
Merchant AppID |
Merchant Name |
Send_name |
Is |
Tian Hong Department Store |
String (32) |
Name of the sender of the red envelope |
User OpenID |
Re_openid |
Is |
oxtwiugait6gtksqrlau2m0yl16e |
String (32) |
The seed user who receives the red envelope (first user)
The user's OpenID under the Wxappid
|
Total Amount |
Total_amount |
Is |
1000 |
Int |
The total amount of red envelopes, that is, the sum of a group of red envelopes, including the share of red envelopes and fission of red envelopes, unit |
Total number of red envelopes issued |
Total_num |
Is |
3 |
Int |
The total number of red envelopes issued, that is, how many people can receive the red envelopes (including the share) |
Red Envelope Amount Set |
Amt_type |
Is |
All_rand |
String (32) |
How to set the amount of red envelopes
all_rand-all random, merchant designated total amount and red envelope total number, by micro-letter payment randomly calculate each red envelope amount
all_specified-All Customizations
seed_specified-seed Red Envelopes Custom, other random
|
The amount of each red envelope |
Amt_list |
Whether |
200|100|100 |
String (256) |
Each red envelope specific amount, the custom amount must set, the unit cent |
Blessing Words for red envelopes |
Wishing |
Is |
Thank you for taking part in guessing lantern riddle activities, I wish you a Happy Lantern Festival! |
String (128) |
Blessing Words for red envelopes |
Activity name |
Act_name |
Is |
Guessing riddles Rob Red envelopes activities |
String (32) |
Activity name |
Note |
Remark |
Is |
The more you guess, the more you come to rob! |
String (256) |
Memo Information |
URL of the Merchant logo |
Logo_imgurl |
Whether |
Yun_qi_img/ico-logo.png |
String (128) |
URL of merchant logo (not open) |
Background watermark Picture |
Watermark_imgurl |
Whether |
Yun_qi_img/ico-logo.png |
String (128) |
Background watermark Picture URL |
Details Page Banner Chart |
Banner_imgurl |
Whether |
Yun_qi_img/ico-logo.png |
String (128) |
Banner picture URL for the Red Envelope details page |
<xml>
<sign><! [cdata[e1ee61a91c8e90f299de6ae075d60a2d]]></sign>
<mch_billno><! [cdata[0010010404201411170000046545]]></mch_billno>
<mch_id><! [cdata[888]]></mch_id>
<wxappid><! [cdata[wxcbda96de0b165486]]></wxappid>
<send_name><! [cdata[send_name]]></send_name>
<re_openid><! [cdata[onqojjmm1tad-3ropncn-yufa6ui]]></re_openid>
<total_amount><! [cdata[200]]></total_amount>
<amt_type><! [cdata[all_rand]]></amt_type>
<amt_list><! [cdata[200|100|100]]></amt_list>
<total_num><! [cdata[3]]></total_num>
<wishing><! [cdata[Congratulations to the rich]]></wishing>
<act_name><! [cdata[New Year red envelopes]]></act_name>
<remark><! [cdata[New Year red envelopes]]></remark>
<logo_imgurl><! [cdata[yun_qi_img/wxpaylogo.png]]></logo_imgurl>
<share_content><! [cdata[share_content]]></share_content>
<share_url><! [cdata[yun_qi_img/wxpaylogo.png]]></share_url>
<share_imgurl><! [cdata[https:/xx/img/wxpaylogo.png]]></share_imgurl>
<watermark_imgurl><! [cdata[https:/xx/img/wxpaylogo.png]]></watermark_imgurl>
<banner_imgurl><! [cdata[https:/xx/img/wxpaylogo.png]]></banner_imgurl>
<nonce_str><! [cdata[50780e0cca98c8c8e814883e5caa672e]]></nonce_str>
|
Field name |
Variable name |
must fill |
Sample Value |
type |
Description |
Return Status Code |
Return_code |
Is |
SUCCESS |
String (16) |
Success/fail
This field is a communication identifier, not a trade mark, and the success of the transaction needs to be viewed Result_code to determine
|
return information |
Return_msg |
Whether |
Signature failed
|
String (128) |
Returns information, such as Non-null, for error reasons
Signature failed
Parameter Format checksum error
|
The following fields are returned when Return_code is success |
Signature |
Sign |
Is |
C380bec2bfd727a4b6845133519f3ad6 |
String (32) |
The signature generation algorithm is described in the form of signature generation |
Business results |
Result_code |
Is |
SUCCESS |
String (16) |
Success/fail |
Error code |
Err_code |
Whether |
Systemerror |
String (32) |
Error code information |
Error code description |
Err_code_des |
Whether |
System error |
String (128) |
Result Information Description |
The following fields are returned when both Return_code and Result_code are success |
Merchant Order Number |
Mch_billno |
Is |
10000098201411111234567890 |
String (28) |
Merchant Order Number (each order number must be unique)
Composition: mch_id+yyyymmdd+10 digits that cannot be repeated in a single day
|
Merchant number |
mch_id |
Is |
10000098 |
String (32) |
The merchant number of the micro-credit payment distribution |
Public account AppID |
Wxappid |
Is |
wx8888888888888888 |
String (32) |
Merchant AppID |
User OpenID |
Re_openid |
Is |
oxtwiugait6gtksqrlau2m0yl16e |
String (32) |
The seed user who receives the red envelope (first user)
The user's OpenID under the Wxappid
|
Total Payment Amount |
Total_amount |
Is |
1000 |
Int |
Total payment amount, per cent |
Time to issue success |
Send_time |
Is |
20150227091010 |
String (14) |
Red envelopes are issued in the form of YYYYMMDDHHMMSS, such as February 27, 2015 9:10 10 seconds for 20150227091010 |
Micro Letter Number |
Send_listid |
Is |
1000000000201502270093647546 |
String (32) |
Micro-Credit Red envelope order number |
<xml>
<return_code><! [cdata[success]]></return_code>
<return_msg><! [cdata[issued successfully.]] ></return_msg>
<result_code><! [cdata[success]]></result_code>
<err_code><! [cdata[0]]></err_code>
<err_code_des><! [cdata[issued successfully.]] ></err_code_des>
<mch_billno><! [cdata[0010010404201411170000046545]]></mch_billno>
<mch_id>10010404</mch_id>
<wxappid><! [cdata[wx6fa7e3bab7e15415]]></wxappid>
<re_openid><! [cdata[onqojjmm1tad-3ropncn-yufa6ui]]></re_openid>
<total_amount>3</total_amount>
<send_time>20150227091010</send_time>
<send_listid>1000000000201502270093647546</send_listid>
|
<xml>
<return_code><! [cdata[fail]]></return_code>
<return_msg><! [cdata[system busy, please try again later.]] ></return_msg>
<result_code><! [cdata[fail]]></result_code>
<err_code><! [cdata[268458547]]></err_code>
<err_code_des><! [cdata[system busy, please try again later.]] ></err_code_des>
<mch_billno><! [cdata[0010010404201411170000046542]]></mch_billno>
<mch_id>10010404</mch_id>
<wxappid><! [cdata[wx6fa7e3bab7e15415]]></wxappid>
<re_openid><! [cdata[onqojjmm1tad-3ropncn-yufa6ui]]></re_openid>
<total_amount>3</total_amount>
</xml>
|
Error code
|
Describe
|
Solution
|
Ca_error
|
Request not carrying certificate, or request to carry a certificate error
|
Download the certificate to the Merchant platform, request to bring the certificate and try again.
|
Sign_error
|
Merchant Signature Error
|
Regenerate the signature as required by the document and try again.
|
Freq_limit
|
Subject to frequency limits
|
Please do frequency control on the request
|
Xml_error
|
The requested XML format error, or the Post's data is empty
|
Check the request string and try again after confirming the error
|
Param_error
|
Parameter error
|
Please check the err_code_des to modify the parameters of the set error
|
Openid_error
|
OpenID Error
|
According to the user in the merchant public account OpenID, obtain the user in the Red Envelope public account's OpenID error. Please check the merchant's own public number AppID and the user's OpenID under this public number.
|
Notenough
|
Insufficient balance
|
Merchant account balance is insufficient, please login micro-letter payment merchant Platform Recharge
|
Fatal_error
|
When a request is repeated, the argument is inconsistent with the original order
|
When a duplicate request is made using the same merchant number, the parameter is inconsistent with the first request, please check and modify the parameters and try again.
|
time_limited
|
Limited time to send red envelopes for corporate
|
Please 0:00-8:00 time to trigger the bonus
|
second_over_limited
|
Limited payment of corporate red envelopes by minute
|
No more than 1800 packets per minute; (Can contact micro-letter Payment wxhongbao@tencent.com to increase the amount)
|
Day_ over_limited
|
Corporate red envelopes are limited by the light of the daylight
|
The number of packets sent by a single merchant is no more than 10,000; (can be linked to micro-letter payment wxhongbao@tencent.com to increase the amount)
|
Money_limit
|
Limit on the amount of red envelopes
|
The amount of each red envelope must be greater than 1 yuan, less than 1000 yuan (can contact micro-letter Payment wxhongbao@tencent.com increase to 4999 yuan)
|
Xml_error
|
The requested XML format error, or the Post's data is empty
|
Check the request string and try again after confirming the error
|
Send_failed
|
Red envelopes fail, please change the number and try again
|
Original merchant number has failed, if also to the same user issued red envelopes, need to replace a new merchant number and try again.
|
Systemerror
|
The system is busy, please try again.
|
Can be called again with the same merchant number, will only issue a red envelope
|