# Request authorization information
Interface should be called on the server side, not in the front end (Weixin Mini Program, web pages, APP, etc.) directly called, specific reference interface call guide
Interface English name: invoiceBizGetAuthData
The receiving authority may call this interface to query whether the order has been authorized by the user.
# 1. How to call
# HTTPS calls
POST https://api.weixin.qq.com/card/invoice/getauthdata?access_token=ACCESS_TOKEN
# Cloud Calls
- This interface does not support cloud calls
# Third party invocation
This interface supports Third Party Platform generation business call.
The permission set to which this interface belongs is: 26
When a service provider is authorized by one of the permissions set, it can call on behalf of the merchant by using authorizer_access_token , which can be viewed in the third-party call documentation.
# 2. Request parameters
# Query parametersQuery String parameters
Parameter Name | type | Required to fill in | Example | Introductions |
---|---|---|---|---|
access_token | string | yes | ACCESS_TOKEN | Interface invocation credentials, using access_token , authorizer_access_token |
# Request BodyRequest Payload
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
order_id | string | yes | Order order_id |
s_pappid | string | yes | Finance Department ID |
# 3. Return Parameters
# Response Payload
Parameter Name | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
invoice_status | string | Status of invoice |
auth_time | number | Authorisation timestamp |
# 4. Note
There are no special considerations for this interface
# 5. Code examples
Example Requests
{
"s_pappid": "wx123456",
"order_id": "123456"
}
Return an example
{
"errcode": 0,
"errmsg": "ok",
"invoice_status": "auth success",
"auth_time": 1480342498
}
# 6. Error code
The following is a list of error codes for this interface, other error codes can refer to General error codes
Error code | Error Description | Solutions |
---|---|---|
40078 | invalid card status | Card_id is not authorized.If the developer uses a sandbox environment to report this error, it is mainly because WeChat of the calling interface has not been added to the test list;If the developer uses a formal environment to report this error, the main reason may be that the calling interface Official Account does not open card voucher permissions, or the creation of card_id and the card insertion time is too short. |
72015 | unauthorized create invoice | You do not have permission to operate, check if you have the appropriate permission turned on. |
72031 | invalid params | The parameter is wrong. It may include invalid parameter names in the request or include parameter values that are not validated in the background |
72035 | biz reject insert | Fiscal electronic notes have been denied access. If the order_id is used as a parameter to call the refuse collection interface, then the card machine will report this error using this order_id |
72036 | invoice is busy | The financial electronic note is being changed in status. Please try again later |
72038 | invoice order never auth | The order is not authorized, it may be the s_p AppID of the Finance and Politics Bureau, the receiving unit appid, and the order order_id do not match |
72040 | invoice pdf error | PDF is invalid, please provide a true and valid pdf |
72042 | billing_code and billing_no repeated | Repeated ticket number and ticket code |
72043 | billing_code or billing_no size error | Error in ticket number and ticket code |
# 7. Scope of application
Official Account | Service Account |
---|---|
✔ | ✔ |
- ✔: The account can call this interface
- Other account types that are not expressly stated may not be called on this interface without special instructions;