# Request authorization information

Debugging Tools

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 NametypeRequired to fill inExampleIntroductions
access_tokenstringyesACCESS_TOKENInterface invocation credentials, using access_token , authorizer_access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inIntroductions
order_idstringyesOrder order_id
s_pappidstringyesFinance Department ID

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberError code
errmsgstringError message
invoice_statusstringStatus of invoice
auth_timenumberAuthorisation 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 codeError DescriptionSolutions
40078invalid 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.
72015unauthorized create invoiceYou do not have permission to operate, check if you have the appropriate permission turned on.
72031invalid 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
72035biz 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
72036invoice is busyThe financial electronic note is being changed in status. Please try again later
72038invoice order never authThe 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
72040invoice pdf errorPDF is invalid, please provide a true and valid pdf
72042billing_code and billing_no repeatedRepeated ticket number and ticket code
72043billing_code or billing_no size errorError in ticket number and ticket code

# 7. Scope of application

How this interface can be invoked under different account types:
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;