# Get Payment Order Details
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: nontaxgetorder
This interface is used to obtain payment order details
# 1. How to call
# HTTPS calls
POST https://api.weixin.qq.com/nontax/getorder?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 Name | type | Required to fill in | Introductions |
---|---|---|---|
access_token | string | yes | Interface invoke credentials, using access_token |
# Request BodyRequest Payload
Parameter Name | type | Required to fill in | Introductions |
---|---|---|---|
appid | string | yes | appid |
service_id | number | no | Service id |
order_id | string | yes | Order id |
# 3. Return Parameters
# Response Payload
Parameter Name | type | Introductions |
---|---|---|
errcode | number | Return code |
errmsg | string | Return code description |
appid | string | appid |
openid | string | User ID |
order_id | string | order number |
create_time | number | Order creation time (timestamp, in seconds) |
pay_finish_time | number | Order payment success time (timestamp, in seconds) |
desc | string | Description (name of service) |
fee | number | Total Amount (in units of units) |
fee_type | number | Currency 1: RMB 2: US Dollar |
trans_id | string | Payment transaction number |
status | number | Order Total Status 1: No payment yet; 3 or 4: The payment was successful; 5: The refund has been made; 6: refund is in place; 12: Orders that are overdue automatically close (if a partial refund only refunds a portion of the amount, the total status of the order does not change, and the total status becomes refunded only when the total status is fully refunded) |
bank_id | string | Bank ID (globally unique ID assigned by WeChat non-tax platform) |
bank_name | string | Bank Name |
bank_account | string | Bank account |
refund_finish_time | number | Refund completion time (timestamp, in seconds) |
refund_reason | string | Reasons for refund |
refund_order_id | string | Refund order number |
refund_out_id | string | External number entered at the time of refund |
payment_notice_no | string | Payment Notice Number (returned according to the parameters requested by placing the order) |
order_no | string | The order number. (Returned based on the parameters requested by placing the order) |
department_code | string | Receipt unit code |
department_name | string | Name of receiving unit |
payment_notice_type | number | Type of notification |
region_code | string | Administrative division codes |
items | object | Details of the sub-item of contributions |
bill_type_code | string | Type of note encoding |
bill_no | string | The note number |
payment_info_source | number | Sources of receivables, 1: Finance 2: Commission Office |
partial_refund_info | object | Part refund information |
notify_history | object | Notification History |
scene | string | The scene."biz": WeChat Official Account "ctiyservice":City service "miniprogram": Weixin Mini Program "offline": offline code "pc": pc "app": mobile app "other": other |
# Res.itemsObject Payload
Details of the sub-item of contributions
Parameter Name | type | Introductions |
---|---|---|
no | number | Item numbers, such as 1, 2, 3 |
item_id | string | Project coding |
item_name | string | Project Name |
overdue | number | Late payments (in units of units) |
penalty | number | Amount of additional penalty (in units of units) |
fee | number | Amount (inclusive of late fees and additional penalties, in units of decimal units) |
# Res.partial_refund_infoObject Payload
Part refund information
Parameter Name | type | Introductions |
---|---|---|
refund_order_id | string | Refund order number |
refund_reason | string | Reasons for refund |
refund_fee | number | Refund Amount (in units of cents) |
refund_finish_time | number | Refund completion time (timestamp, in seconds) |
refund_out_id | string | External number entered at the time of refund |
refund_status | number | Status of refunds; 5: The refund has been made; 6: In the refund |
# Res.notify_historyObject Payload
Notification History
Parameter Name | type | Introductions |
---|---|---|
appid | string | Third party AppID |
name | string | Third party names |
notify_detail | object | Details of notification (first and last notification) |
notify_cnt | number | Number of notifications |
# Res.notify_history.notify_detailObject Payload
Details of notification (first and last notification)
Parameter Name | type | Introductions |
---|---|---|
notify_time | number | Notification Time (timestamp, in seconds) |
ret | number | WeChat Background notification total return code |
ret_errmsg | string | WeChat Background Notification Total Return Information |
cost_time | number | Time consumed (in milliseconds) |
wxnontaxstr | string | Random character string with one request on url parameter |
status | number | Order status; 3 or 4: The payment was successful; 5: Money has been refunded |
url | string | The url for the third party to receive the notification |
errcode | number | Third party return code; 0 - Success; 210 - Wrong data format; 232 - Contribution has been paid by notice of payment; 236 - You are not allowed to pay in this bank; 298 - Decryption failed; 299 - A system error; 300 - Signature Error |
errmsg | string | Third parties return information, such as non-empty, for error reasons |
third_resp | string | Return of third parties |
third_resp_data | string | Third party returns decrypted data |
# 4. Note
There are no special considerations for this interface
# 5. Code examples
Example Requests
{
"appid": "wx5f6e43071809a9dd",
"order_id": "AQCAGxwqp6-aBeIKDJ7fvb6x3dZt",
}
Return an example
{
"errcode": 0,
"errmsg": "ok",
"appid": "wx5f6e43071809a9dd",
"openid": "ont-9vjAcIdSU-LgB7ubALAVJO9U",
"order_id": "AQCAGxwqp6-aBeIKDJ7fvb6x3dZt",
"create_time": 1508847678,
"pay_finish_time": 0,
"desc": "测试办证缴费",
"fee": 1,
"fee_type": 1,
"trans_id": "",
"status": 12,
"bank_id": "test_bank_id",
"bank_name": "测试_银行",
"bank_account": "6215385809487657",
"refund_finish_time": 0,
"items": [
{
"no": 1,
"item_id": "000001",
"item_name": "测试办证缴费1",
"overdue": 0,
"fee": 1
},
{
"no": 2,
"item_id": "000002",
"item_name": "测试办证缴费2",
"overdue": 0,
"fee": 0
}
],
"bill_type_code": "",
"bill_no": "",
"payment_info_source": 2,
"payment_notice_no": "08111639088",
"department_code": "118610002",
"department_name": "测试执收单位",
"payment_notice_type": 1,
"region_code": "440000",
"notify_history": [
{
"appid": "wx5f6e43071809a9dd",
"name": "测试财政",
"notify_detail": [
{
"notify_time": 1524023367,
"ret": 0,
"cost_time": 39,
"wxnontaxstr": "2ba37f90d155d390",
"status": 3,
"errcode": 0,
"errmsg": ""
}
],
"notify_cnt": 1
},
{
"appid": "wxefd0818f53b9b82f",
"name": "测试委办局",
"notify_detail": [
{
"notify_time": 1524023367,
"ret": 0,
"cost_time": 20,
"wxnontaxstr": "f7ad824e08ac4bc5",
"status": 3,
"errcode": 0,
"errmsg": ""
}
],
"notify_cnt": 1
},
{
"appid": "wxf1bfa94c33668abf",
"name": "测试银行",
"notify_detail": [
{
"notify_time": 1524023367,
"ret": 0,
"cost_time": 18,
"wxnontaxstr": "2e628b6f1e3e9bf3",
"status": 3,
"errcode": 0,
"errmsg": ""
}
],
"notify_cnt": 1
}
]
}
# 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 |
---|---|---|
0 | Ok or in a normal state | OK means to go from abnormal to normal in a normal state |
40001 | invalid credential access_token isinvalid or not latest | access_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;