Parameter | Description |
---|
ToUserName | Developer WeChat ID. |
FromUserName | Sender account (an OpenID). |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
Event | Event type, user_consume_card (write-off event) |
CardId | Card ID. |
UserCardCode | Card code. |
ConsumeSource | Confirmation source. Supports developer statistics API write-off (FROM_API), public platform write-off (FROM_MP), card and coupon merchant assistant write-off (FROM_MOBILE_HELPER) (verifier WeChat ID) |
LocationName | Store name, the name of the store where the current card and coupon are being verified (this field will only appear through self-service verification and purchase order verification) |
StaffOpenId | The openid of the person who verifies the card and coupon (will only appear when verification is done through the card and coupon merchant assistant) |
VerifyCode | The verification code entered by the user during self-service verification |
##RemarkAmount | The remark amount entered by the user during self-service write-off |
OuterStr | Initiated by the developer Custom parameters passed in during write-off, used for write-off channel statistics |
Parameter | Description |
---|
ToUserName | Developer WeChat ID. |
FromUserName | Sender account (an OpenID). |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
##Event | Event type, User_pay_from_pay_cell (WeChat pay event) |
CardId | Card ID. |
UserCardCode | Card code. |
TransId | WeChat payment transaction order number (only cards and coupons that are verified using the purchase function will appear) |
LocationId | Store ID, the store ID of the current card and coupon verification (only through the card and coupon merchant assistant and It will only appear when the purchase order is written off) |
Fee | Amount actually paid, in cents |
OriginalFee | Amount payable in cents |
Use web debugging tools to debug this interface
2.7 Enter membership card event push
When the user enters the membership card, WeChat will push this event to the URL filled in by the developer.
Developers are required to fill in the need_push_on_view field and set it to true when creating a membership card. Developers must consider the number of cardholders and server pressure to decide whether to accept this event.
Push XML packet example:
<xml>
<ToUserName> <![CDATA[gh_fcxxxx6a20993]]> </ToUserName>
<FromUserName> <![CDATA[oZI8Fj040-xxxxx6gkoPOQTQ]]> </FromUserName>
<CreateTime>1467811138</CreateTime>
<MsgType> <![CDATA[event]]> </MsgType>
<Event> <![CDATA[user_view_card]]> </Event>
<CardId> <![CDATA[pZI8Fj2ezBbxxxxxT2UbiiWLb7Bg]]> </CardId>
<UserCardCode> <![CDATA[4xxxxxxxx8558]]> </UserCardCode>
<OuterStr> <![CDATA[12b]]> </OuterStr>
</xml>
Parameter description:
Parameters | Description |
---|
ToUserName | Developer WeChat ID. |
FromUserName | Sender account (an OpenID). |
CreateTime | Message creation time (integer). |
MsgType | Message type, event. |
Event | Event type, user_view_card (user clicks on membership card) |
CardId | Card ID. |
UserCardCode | Merchant customized code value. The non-customized code is pushed as an empty string. |
OuterStr | Merchant-defined QR code channel parameters are used to identify this scan code to open the membership card The source comes from the QR code of a certain channel value |
Use web debugging tools to debug this interface
##2.8 Enter the official account session event push from the card coupon
The user clicks on the card coupon to view the official account to enter the session (the user needs to have followed the official account), WeChat will push this event to the URL filled in by the developer. Developers can identify users who enter the official account from cards and coupons. Push XML data package example:
<xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[FromUser]]></FromUserName>
<CreateTime>123456789</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[user_enter_session_from_card]]></Event>
<CardId><![CDATA[cardid]]></CardId>
<UserCardCode><![CDATA[12312312]]></UserCardCode>
</xml>
Parameter description:
Parameters | Description |
---|
ToUserName | Developer WeChat ID. |
FromUserName | Sender account (an OpenID) |
CreateTime | Message creation time (integer). |
MsgType | Message type, event |
Event | Event type, user_enter_session_from_card (the user enters the official account session from the card coupon) |
CardId | Card ID. |
UserCardCode | Code code. |
Use web debugging tools to debug this interface
##2.9 Membership card content update event
When the user’s membership card points balance changes, WeChat will push the event Notify developers. Push XML packet example:
<xml>
<ToUserName><![CDATA[gh_9e1765b5568e]]></ToUserName>
<FromUserName><![CDATA[ojZ8YtyVyr30HheH3CM73y7h4jJE]]></FromUserName>
<CreateTime>1445507140</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[update_member_card]]></Event>
<CardId><![CDATA[pjZ8Ytx-nwvpCRyQneH3Ncmh6N94]]></CardId>
<UserCardCode><![CDATA[485027611252]]></UserCardCode>
<ModifyBonus>3</ModifyBonus>
<ModifyBalance>0</ModifyBalance>
</xml>
Parameter description:
Parameters | Description |
---|
ToUserName | Developer WeChat ID. |
FromUserName | Sender account (an OpenID) |
CreateTime | Message creation time (integer). |
MsgType | Message type, event |
Event | Event type, update_member_card (membership card content update) |
CardId | Card coupon ID. |
UserCardCode | Code code. |
ModifyBonus | Changed points value. |
ModifyBalance | The changed balance value. |
Use web debugging tools to debug this interface
##2.10 Inventory Alarm Event
#When the initial inventory of a card_id is greater than 200 and the current inventory is less than or equal to 100, the user attempts to receive the coupon will trigger a sending event To merchants, events are sent every 12 hours.
<xml>
<ToUserName><![CDATA[gh_2d62d*****0]]></ToUserName>
<FromUserName><![CDATA[oa3LFuBvWb7*********]]></FromUserName>
<CreateTime>1443838506</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[card_sku_remind]]></Event>
<CardId><![CDATA[pa3LFuAh2P65**********]]></CardId>
<Detail><![CDATA[the card's quantity is equal to 0]]></Detail>
</xml>
Parameter description:
Parameters | Description |
---|
ToUserName | Developer WeChat ID |
##FromUserName | Sender, WeChat |
CreateTime | Message creation time (integer) |
MsgType | Message type, event |
Event | Event type, card_sku_remind inventory alarm |
CardId | Card Coupon ID |
Detail | Alarm details |
Use web debugging tools to debug this interface
##2.11 Coupon point transaction details event
#When a merchant’s friend’s coupon points change, the WeChat server will push a message to the merchant server.
<xml>
<ToUserName><![CDATA[gh_7223c83d4be5]]></ToUserName>
<FromUserName><![CDATA[ob5E7s-HoN9tslQY3-0I4qmgluHk]]></FromUserName>
<CreateTime>1453295737</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[card_pay_order]]></Event>
<OrderId><![CDATA[404091456]]></OrderId>
<Status><![CDATA[ORDER_STATUS_FINANCE_SUCC]]></Status>
<CreateOrderTime>1453295737</CreateOrderTime>
<PayFinishTime>0</PayFinishTime>
<Desc><![CDATA[]]></Desc>
<FreeCoinCount><![CDATA[200]]></FreeCoinCount>
<PayCoinCount><![CDATA[0]]></PayCoinCount>
<RefundFreeCoinCount><![CDATA[0]]></RefundFreeCoinCount>
<RefundPayCoinCount><![CDATA[0]]></RefundPayCoinCount>
<OrderType><![CDATA[ORDER_TYPE_SYS_ADD]]></OrderType>
<Memo><![CDATA[开通账户奖励]]></Memo>
<ReceiptInfo><![CDATA[]]></ReceiptInfo>
</xml>
Parameter description:
Parameters | Description |
---|
##ToUserName | Developer WeChat ID |
##FromUserName | Sender, WeChat |
CreateTime | Message creation time (integer) |
MsgType | Message type, event |
Event | Event type, card_pay_order coupon point transaction details event |
OrderId | The order number corresponding to this push |
Status | This order The status of the number, ORDER_STATUS_WAITING Waiting for payment ORDER_STATUS_SUCC Payment successful ORDER_STATUS_FINANCE_SUCC Adding tokens successfully ORDER_STATUS_QUANTITY_SUCC Adding inventory successfully ORDER_STATUS_HAS_REFUND Refunded coins ORDER_STATUS_REFUND_WAITING Waiting for coin refund confirmation ORDER_STATUS_ROLLBACK Refunded, system failure ORDER_STATUS_HAS_RECEIPT Invoice issued |
CreateOrderTime | When purchasing coupon points, the payment QR code generation time |
##PayFinishTime | When purchasing coupon points, the actual time when payment is successful |
Desc | Payment method, usually WeChat Pay recharge |
FreeCoinCount | Number of remaining free coupon points |
PayCoinCount | Number of remaining paid coupon points |
RefundFreeCoinCount | The number of free coupon points for this change |
RefundPayCoinCount | This time Changed number of paid coupon points |
##OrderType | Order type to be pulled ORDER_TYPE_SYS_ADD Platform gift coupon points ORDER_TYPE_WXPAY Recharge coupon points ORDER_TYPE_REFUND Inventory unused refund coupon points ORDER_TYPE_REDUCE Coupon points exchange for inventory ORDER_TYPE_SYS_REDUCE Platform deduction |
Memo | System notes explain the reasons for this change, such as account opening rewards, store rewards, write-off rewards, and recharges and deductions. |
ReceiptInfo | Details of the invoice issued |
Use web debugging tools to debug this interface
2.12 Membership card activation event push
When the user submits information through one-click activation and clicks to activate, the merchant will receive an event push activated by the user
<xml>
<ToUserName> <![CDATA[gh_3fcea188bf78]]></ToUserName>
<FromUserName><![CDATA[obLatjlaNQKb8FqOvt1M1x1lIBFE]]></FromUserName>
<CreateTime>1432668700</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[submit_membercard_user_info]]></Event>
<CardId><![CDATA[pbLatjtZ7v1BG_ZnTjbW85GYc_E8]]></CardId>
<UserCardCode><![CDATA[018255396048]]></UserCardCode>
</xml>
Parameter Description
## parameter | |
---|
| ##Developer WeChat ID since OpenID) |
CreateTime | Message creation time (integer) |
MsgType | Message type, event |
##CardId | Card Coupon Code |
Use the web debugging tool to debug the interface | |