# 1. Save Invoice Title Information in the User's Weixin
API Description
Call this API to obtain the URL to which the invoice title information will be stored and send the URL to the Weixin user. After confirmation by the user, the information is saved.
Request format
URL: https://api.weixin.qq.com/card/invoice/biz/getusertitleurl?access_token={access_token}
Request method: POST
Protocol: HTTPS
Request parameters
Data format: POST
# Response Parameters
# Data format: POST
If the error code is 0, the following information is returned:
# Request example
# 2. Obtain User's Invoice Title (Method 1): Get the Merchant-specific QR Code and Place It at the Checkout Counter
# API description
The merchant calls this API to get an URL and converts it to a QR code, which users can scan to select the invoice title to send to the merchant.
# Request format
URL:https://api.weixin.qq.com/card/invoice/biz/getselecttitleurl?access_token={access_token}
Request method: POST
Protocol: HTTPS
# Request parameters
Data format: POST
Data format: POST Response parameters
If the error code is 0, the following information is returned:
#
# Request example
#
# 3. Obtain User's Invoice Title (Method 2): Merchant Scans the User's Invoice Title QR Code
# API description
The merchant scans the user's invoice title QR code ("Me" > "My Profile" > "My Invoice Titles") and obtains the user's invoice title information by calling this API.
# Request format
URL:https://api.weixin.qq.com/card/invoice/scantitle?access_token={access_token}
Request method: POST
Protocol: HTTPS
# Request parameters
Data format: POST
# Response parameters
# Request example
# 4. Obtain User's Invoice Title (Method 3): Gets User's Title Information Saved in Weixin by Calling the JS API in the HTML Page##
This API is not public, so it is not exposed in the wx object.
The following method can be used to call non-public APIs:
During wx.config, provide the parameter beta: true.
Use wx.invoke(name, args, callback), where name is the API name, args is the parameter object, and callback is the callback function.
The specific values for this API are as follows:
wx.invoke('chooseInvoiceTitle', {
// Provide the parameter here.
}, function (res) {
// Call results are processed here.
})
Request parameters:
Response result: Sample code wx.ready(function () { wx.invoke(' chooseInvoiceTitle ', { "scene":"1" }, function(res) { //This is the callback function. }); });
The structure of choose_invoice_title_info object is as follows:
{ "type":"0", "title": "Tencent Technology (Shenzhen) Co., Ltd.", "taxNumber":"123466789987646131", "companyAddress":"Tencent Building, XX Street, Nanshan District, Shenzhen", "telephone":"123456789", "bankName":"XX bank", "bankAccount":"621111111111290" }
# 5. Receiving User-submitted Titles
# API description
After a user submits a title, the merchant will receive a user submission event.
For more information on event push, please see:
# Request parameters
Data format: XML
Example