# Customer Receipt Notice
After the user initiates the coupon operation on WeChat, the user will call back the merchant to receive the coupon, and the merchant will return the specific coupon result according to the stock of the coupon. If the merchant returns successfully, the platform side will record the returned user coupons, in order to avoid the failure of recording due to network anomalies, etc. It is recommended that merchants call "Add User Coupon" interface when issuing coupons successfully. The platform side will ensure the uniqueness according to the merchant side coupon ID and merchant side user voucher ID returned by merchants.It is recommended to also call the Update Coupon Inventory interface for inventory updates.
# Callback request parameter example
Depending on the data format (json or xml) set by the merchant, xml is an example
<xml>
<ToUserName>gh_abcdefg</ToUserName>
<FromUserName>oABCD</FromUserName>
<CreateTime>12344555555</CreateTime>
<MsgType>event</MsgType>
<Event>open_product_receive_coupon</Event>
<out_coupon_id>real_out_coupon_id</out_coupon_id>
<request_id>real_request_id</request_id>
</xml>
# Callback Back Sample
Depending on the data format (json or xml) set by the merchant, xml is an example
<xml>
<out_user_coupon_id>real_out_user_coupon_id</out_user_coupon_id>
<request_id>real_request_id</request_id>
<right_code>0</right_code>
<right_msg>ok</right_msg>
<out_coupon_id>real_out_coupon_id</out_coupon_id>
</xml>
# Callback request parameter explaination
parameter | type | Introductions |
---|---|---|
ToUserName | string | Merchant applet name |
FromUserName | string | WeChat users OpenID |
CreateTime | number | Time of event, Unix timestamp |
MsgType | string | Message type, fixed to event |
Event | string | Event type, this interface is fixed to open_product_receive_coupon |
out_coupon_id | string | Merchant End Coupon ID |
request_id | string | Request a unique ID |
# Callback return parameter specification
parameter | type | Introductions |
---|---|---|
right_code | number | 0: Success, 1090029: Insufficient inventory, 10900030: Individual limit overrun limit, 10990031: Request frequency limit, 109 0057: Coupon does not exist, 109 90058: coupon status is not correct, 109 00032: System failure, 1099 0033: Other logic failure |
right_msg | string | Back to Description |
out_user_coupon_id | string | Merchant User Coupon ID |
out_coupon_id | string | Merchant Side Coupon ID |
request_id | string | Request a unique ID |