# Get Payment Order Details

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: 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 NametypeRequired to fill inIntroductions
access_tokenstringyesInterface invoke credentials, using access_token

# Request BodyRequest Payload

Parameter NametypeRequired to fill inIntroductions
appidstringyesappid
service_idnumbernoService id
order_idstringyesOrder id

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberReturn code
errmsgstringReturn code description
appidstringappid
openidstringUser ID
order_idstringorder number
create_timenumberOrder creation time (timestamp, in seconds)
pay_finish_timenumberOrder payment success time (timestamp, in seconds)
descstringDescription (name of service)
feenumberTotal Amount (in units of units)
fee_typenumberCurrency 1: RMB 2: US Dollar
trans_idstringPayment transaction number
statusnumberOrder 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_idstringBank ID (globally unique ID assigned by WeChat non-tax platform)
bank_namestringBank Name
bank_accountstringBank account
refund_finish_timenumberRefund completion time (timestamp, in seconds)
refund_reasonstringReasons for refund
refund_order_idstringRefund order number
refund_out_idstringExternal number entered at the time of refund
payment_notice_nostringPayment Notice Number (returned according to the parameters requested by placing the order)
order_nostringThe order number. (Returned based on the parameters requested by placing the order)
department_codestringReceipt unit code
department_namestringName of receiving unit
payment_notice_typenumberType of notification
region_codestringAdministrative division codes
itemsobjectDetails of the sub-item of contributions
bill_type_codestringType of note encoding
bill_nostringThe note number
payment_info_sourcenumberSources of receivables, 1: Finance 2: Commission Office
partial_refund_infoobjectPart refund information
notify_historyobjectNotification History
scenestringThe 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 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)

# Res.partial_refund_infoObject Payload

Part refund information

Parameter NametypeIntroductions
refund_order_idstringRefund order number
refund_reasonstringReasons for refund
refund_feenumberRefund Amount (in units of cents)
refund_finish_timenumberRefund completion time (timestamp, in seconds)
refund_out_idstringExternal number entered at the time of refund
refund_statusnumberStatus of refunds; 5: The refund has been made; 6: In the refund

# Res.notify_historyObject Payload

Notification History

Parameter NametypeIntroductions
appidstringThird party AppID
namestringThird party names
notify_detailobjectDetails of notification (first and last notification)
notify_cntnumberNumber of notifications

# Res.notify_history.notify_detailObject Payload

Details of notification (first and last notification)

Parameter NametypeIntroductions
notify_timenumberNotification Time (timestamp, in seconds)
retnumberWeChat Background notification total return code
ret_errmsgstringWeChat Background Notification Total Return Information
cost_timenumberTime consumed (in milliseconds)
wxnontaxstrstringRandom character string with one request on url parameter
statusnumberOrder status; 3 or 4: The payment was successful; 5: Money has been refunded
urlstringThe url for the third party to receive the notification
errcodenumberThird 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
errmsgstringThird parties return information, such as non-empty, for error reasons
third_respstringReturn of third parties
third_resp_datastringThird 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 codeError DescriptionSolutions
0Ok or in a normal stateOK means to go from abnormal to normal in a normal state
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;