


After the last essay, after improving and reconstructing the entire WeChat framework, WeChat payment, corporate payment, cash red envelopes, vouchers and various card coupons have been packaged, and WeChat payment has been included and the shake red envelope part are common parts of official accounts and enterprise accounts. These payment-related interfaces can be called in official accounts and enterprise accounts. After a series of optimization and sorting, these contents will be added one by one. Introducing, hope everyone likes and supports.
1. The concept and use of cash red envelopes
1) Usage scenarios
WeChat Pay cash red envelopes are developed for WeChat Pay merchants. The specific capabilities are as follows:
◆ When merchants call the interface, they issue red envelopes by specifying the sending object and the sending amount. This method allows merchants to flexibly apply it to a variety of rich activity scenarios
◆ Receive After receiving the red envelope, the user's funds are directly transferred to WeChat change, avoiding the complicated award process and giving users the smooth experience of WeChat payment.
2) WeChat red envelope sending rules
Sending frequency rules
◆ The number of red envelopes sent per minute shall not exceed 1,800;
◆ The same merchant number, the maximum number of red envelopes sent per minute The same user sends a red envelope;
Red envelope rules
◆ The amount of a single red envelope is between [1.00 yuan, 200.00 yuan];
◆ The same red envelope can only be sent to one user; (If the above rules do not meet your needs, please send an email to wxhongbao@tencent.com for upgrade instructions)
◆ If the red envelope is not claimed 72 hours after it is issued, it will be processed Refund
3) WeChat red envelope interface calling process
◆Backend API call: communicate with the development team in detail when entering the joint debugging process;
◆ Notify the server: Inform the server of the openID of the user who received the WeChat red envelope, and inform the server of the amount received by the user;
◆ Deduct money from the business account: After the server obtains the information, it will deduct the money from the corresponding business account Get the corresponding amount;
◆ Call failure: The call fails due to non-compliance with the sending rules, insufficient balance of the business account, etc., and feedback to the caller;
◆ Successful sending: public with WeChat red envelope The account sends the corresponding red envelope to the corresponding user;
2. Description of the cash red envelopeAPI interface and The C# package
is used by enterprises to send red envelopes to individual WeChat users. It currently supports issuing red envelopes of specified amounts to the openid of designated WeChat users.
Although cash red envelopes can be issued through the merchant backend of WeChat, we can also use the interface API provided by WeChat to send cash red envelopes.
Interface call request description
Request Url | https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack |
---|---|
Is it required? The certificate | is (see the merchant certificate for certificate and usage instructions) |
Request method | POST |
Request Parameters
Field | Required | Example value | Type | Description | |
---|---|---|---|---|---|
nonce_str | is | 5K8264ILTKCH16CQ2502SI8ZNMTM67VS | String(32) | Random string, no longer than 32 characters | |
sign | is | C380BEC2BFD727A4B6845133519F3AD6 | String(32) | See signature generation algorithm for details | |
mch_billno | is | 10000098201411111234567890 | String(28) | Merchant order number (each order number must be unique) |
Composition: mch_id+yyyymmdd+10 digits cannot be repeated within one day number. The interface supports re-entry based on the merchant's order number. If a timeout occurs, it can be called again. |
mch_id | is | 10000098 | String(32) | The merchant number assigned by WeChat payment | |
wxappid | is | wx8888888888888888 | String(32) | The public account ID assigned by WeChat (corporate number corpid is this appId). All appids passed in through the interface should be the appid of the public account (applied at mp.weixin.qq.com), not the appid of the APP (applied at open.weixin.qq.com). | |
send_name | is | Tianhong Department Store | String(32) | Red envelope sender name | |
re_openid | is | oxTWIuGaIt6gTKsQRLau2M0yL16E | String(32 ) | Users who accept red envelopes |
The user’s openid under wxappid |
total_amount | is | 1000 | int | Payment amount, unit points | |
total_num | is | 1 | int | The total number of people given red envelopes |
total_num=1 |
wishing | Yes | Thank you for participating in the lantern riddle guessing activity, and I wish you a happy Lantern Festival! | String(128) | Red envelope blessings | |
client_ip | is | 192.168.0.1 | String(15) | Machine IP address calling the interface | |
act_name | is | Guessing lantern riddles and grabbing red envelope activities | String(32) | Activity name | |
remark | Yes | The more you guess, the more you get, come and grab it! | String(256) | Remarks |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
