# Payment to place the order

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 name: nontaxunifiedorder

This interface is provided to the Commission for payment of orders.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/nontax/unifiedorder?access_token=ACCESS_TOKEN

# Cloud Calls

  • This interface does not support cloud calls

# Third party invocation

  • Third Party Platform calls are not supported by this interface.

# 2. Request parameters

# Query parametersQuery String parameters

Parameter NametypeRequired to fill inIntroductions
access_tokenstringyesInterface invoke credentials, using access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inIntroductions
appidstringyesappid
service_idnumbernoService id
bank_idstringnoBank ID (globally unique ID assigned by WeChat non-tax platform), randomly selected from the configured list of banks when not specified;The default production environment is not filled, the test environment needs to be filled
bank_accountstringnoSplit up bank account numbers (do not fill in those who do not use the splitting mechanism)
mch_idstringnoSpecify the funds to be settled to mch_id. Can only be settled to mch_id bound under bank_id. Automatically select one from the mch_id bound under bank_id when not filled.
openidstringnoUser ID. When trade_type is MWEB, it does not need to be filled; Other information must be filled in.
descstringyesDescription (name of service)
feenumberyesTotal Amount (in units of units)
return_urlstringnoPayment Middle Page The page to be redirected after payment is completed (Weixin Mini Program Not required to place an order, other required)
ipstringyesClient IP
order_nostringnoThe order number. (The payment notice number and order number must be chosen.) If there is no payment notice number, fill in the order number)
payment_notice_nostringnoPayment Notice Number (Payment Notice number and order number must be chosen twice). If there is no payment notice number, fill in the order number)
department_codestringyesReceipt unit code
department_namestringyesName of receiving unit
payment_notice_typenumbernoType of notification
region_codestringyesAdministrative division codes
user_namestringnoUser Name
itemsobjectyesDetails of the sub-item of contributions
payment_notice_create_timenumberyesPayment Notice Creation Time (timestamp, in seconds)
payment_expire_datestringnoPayment Limit Date, Format YYYMMDD
scenestringyesThe scene."biz": WeChat Official Account "ctiyservice": city service "miniprogram": Weixin Mini Program
app_appidstringnoApp's AppID, required when app orders
trade_typestringnoThe default is JSPI type, non-[ WeChat browser H5 order please fill in MWEB.
auto_call_paybooleannoPayment Intermediate Page / Weixin Mini Program Whether to automatically adjust payment

# Body.itemsObject Payload

Details of the sub-item of contributions

Parameter NametypeRequired to fill inIntroductions
nonumberyesItem numbers, such as 1, 2, 3
item_idstringyesProject coding
item_namestringyesProject Name
overduenumbernoLate payments (in units of units)
penaltynumbernoAmount of additional penalty (in units of units)
feenumberyesAmount (inclusive of late fees and additional penalties, in units of decimal units)

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberReturn code
errmsgstringReturn code description
user_namestringUser Name
feenumberTotal Amount (in units of units)
itemsobjectDetails of the sub-item of contributions
payment_notice_nostringPayment Notice Number
department_codestringReceipt unit code
department_namestringName of receiving unit
payment_notice_typenumberType of notification
region_codestringAdministrative division codes
payment_notice_create_timenumberPayment Notice Creation Time (timestamp, in seconds)
payment_expire_datestringPayment Limit Date, Format YYYMMDD

# Res.itemsObject Payload

Details of the sub-item of contributions

Parameter NametypeIntroductions
nonumberItem numbers, such as 1, 2, 3
item_idstringProject coding
item_namestringProject Name
overduenumberLate payments (in units of units)
penaltynumberAmount of additional penalty (in units of units)
feenumberAmount (inclusive of late fees and additional penalties, in units of decimal units)

# 4. Note

There are no special considerations for this interface

# 5. Code examples

Example Requests

{
  "appid":"wx5f6e43071809a9dd",
  "service_id": 123,
  "bank_id":"470690268",
  "payment_notice_no":"440204190185356",
  "department_code":"143605002004",
  "payment_notice_type":1,
  "region_code":"440000"
}

Return an example

{
  "department_code":"143605002004",
  "department_name":"韶关市公安局交警支队市区一大队",
  "errcode":0,
  "errmsg":"通知书未缴款",
  "fee":20000,
  "items":[
    {
      "fee":20000,
      "item_id":"103050101200",
      "item_name":"交通违法罚款",
      "no":1,
      "overdue":0
    }
  ],
  "payment_notice_create_time":1508806661,
  "payment_notice_no":"440204190185356",
  "payment_notice_type":1,
  "region_code":"440000",
  "user_name":"叶*梅"
}

# 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
-1system errorThe system is busy, so the developer is asked to try again in a few minutes.
40001invalid credential  access_token isinvalid or not latestaccess_token Invalid or not recently acquired access_token, please confirm the validity of the access_token

# 7. Scope of application

How this interface can be invoked under different account types:
Weixin Mini Program Official Account Service Account
Certification only Certification only Certification only
  • Authentication only: means that only authenticated accounts are allowed to be invoked by the enterprise entity, and accounts that are not authenticated or do not support authentication cannot be invoked.
  • Other account types that are not expressly stated may not be called on this interface without special instructions;