# Download Payment Statement

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: nontaxdownloadbill

This interface is used to download payment statements. Please click on them every day after 6 a.m.

# 1. How to call

# HTTPS calls

POST https://api.weixin.qq.com/nontax/downloadbill?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
mch_idstringyesMerchant Number
bill_datestringyesStatement date, format: 20170903
bill_typestringnoALL, returns all order information on the day, the default value; SUCCESS, returning the order successfully paid on the same day; REFUND, Return Same Day Refund Order

# 3. Return Parameters

# Response Payload

Parameter NametypeIntroductions
errcodenumberReturn code
errmsgstringReturn code description

# 4. Note

When successful, the data is returned in the form of csv text table, the first behavior table head, and the corresponding field content of each behavior (specific fields may be added or deleted, whichever is returned)

The first behavior header, which varies depending on the type of bill requested to download (as determined by bill_type), currently has:

  1. All orders for the same day
交易时间,公众账号ID,商户号,子商户号,微信订单号,商户订单号,用户标识,交易类型,交易状态,付款银行,货币种类,总金额,企业红包金额,微信退款单号,商户退款单号,退款金额,企业红包退款金额,退款类型,退款状态,商品名称,手续费,费率,行政区划代码,缴费通知书编号(或平台订单号),执收单位编码,通知书类型,银行ID
  1. Orders that were successfully paid that day
交易时间,公众账号ID,商户号,子商户号,微信订单号,商户订单号,用户标识,交易类型,交易状态,付款银行,货币种类,总金额,企业红包金额,微信退款单号,商户退款单号,退款金额,企业红包退款金额,退款类型,退款状态,商品名称,手续费,费率,行政区划代码,缴费通知书编号(或平台订单号),执收单位编码,通知书类型,银行ID
  1. Orders with same-day refunds
交易时间,公众账号ID,商户号,子商户号,微信订单号,商户订单号,用户标识,交易类型,交易状态,付款银行,货币种类,总金额,企业红包金额,微信退款单号,商户退款单号,退款金额,企业红包退款金额,退款类型,退款状态,商品名称,手续费,费率,行政区划代码,缴费通知书编号(或平台订单号),执收单位编码,通知书类型,银行ID
从第二行起,为数据记录,各参数以逗号分隔,参数前增加`符号,为标准键盘1左边键的字符,字段顺序与表头一致。
倒数第二行为订单统计标题,最后一行为统计数据
总交易单数,总交易额,总退款金额,总企业红包退款金额,手续费总金额

Take the following example:

交易时间,公众账号ID,商户号,子商户号,微信订单号,商户订单号,用户标识,交易类型,交易状态,付款银行,货币种类,总金额,企业红包金额,微信退款单号,商户退款单号,退款金额,企业红包退款金额,退款类型,退款状态,商品名称,手续费,费率,行政区划代码,缴费通知书编号(或平台订单号),执收单位编码,通知书类型,银行ID
`2017-06-01 15:33:10,`wxc971985892358997,`1800004561,`1900016021,`4004332001201706013698057350,`AQCA6cNHMa5QlD4KDJ7fvb6x3dZt,`oFkLxtyJswfbex9crZWHGDYG5NIw,`JSAPI,`SUCCESS,`CMB_CREDIT,`CNY,`0.01,`0.00,`0,`0,`0.00,`0.00,`,`,`办证缴费,`0.00000,`0.00%,`440100,`17001122412,`000000,`1
`2017-06-01 15:44:30,`wxc971985892358997,`1800004561,`1900016021,`4004332001201706013704498976,`AQCAlxpOMa5QlD4KDJ7fvb6x3dZt,`oFkLxtyJswfbex9crZWHGDYG5NIw,`JSAPI,`SUCCESS,`CMB_CREDIT,`CNY,`0.01,`0.00,`0,`0,`0.00,`0.00,`,`,`办证缴费,`0.00000,`0.00%,`440100,`17001122413,`000000,`1
总交易单数,总交易额,总退款金额,手续费总金额
`2,`0.02,`0.0,`0

# 5. Code examples

Example Requests

{
  "appid": "wx6cc9648de104270d",
  "mch_id": "1900016021",
  "bill_date": "20170925",
  "bill_type": "ALL",
}

Return an example

csv 表格文件
交易时间,公众账号ID,商户号,子商户号,微信订单号,商户订单号,用户标识,交易类型,交易状态,付款银行,货币种类,总金额,企业红包金额,微信退款单号,商户退款单号,退款金额,企业红包退款金额,退款类型,退款状态,商品名称,手续费,费率,行政区划代码,缴费通知书编号(或平台订单号),执收单位编码,通知书类型,银行ID
`2017-09-25 09:39:03,`wxc971985892358997,`1800004561,`1900016021,`4200000022201709254109017673,`AQAAc_FXW6_CCUtkDNP0Z7csEgVD,`,`JSAPI,`SUCCESS,`CFT,`CNY,`0.02,`0.00,`0,`0,`0.00,`0.00,`,`,`广东省非税微信缴费,`0.00000,`0.00%,`440000,`1713372142,`118610002,`1,`test_470690267
`2017-09-25 10:05:01,`wxc971985892358997,`1800004561,`1900016021,`4200000022201709254114686941,`AQCA7tdjW6-aAFhkDNP0Z7csEgVD,`,`JSAPI,`SUCCESS,`CFT,`CNY,`0.02,`0.00,`0,`0,`0.00,`0.00,`,`,`广东省非税微信缴费,`0.00000,`0.00%,`440000,`1713372144,`118610002,`1,`test_470690267
`2017-09-25 10:08:37,`wxc971985892358997,`1800004561,`1900016021,`4200000023201709254110290403,`AQCARHplW6-PTDcKDNP0Z7c4qUGm,`,`JSAPI,`SUCCESS,`CFT,`CNY,`0.02,`0.00,`0,`0,`0.00,`0.00,`,`,`广东省非税微信缴费,`0.00000,`0.00%,`440000,`1713372146,`118610002,`1,`test_470690267
`2017-09-25 10:22:18,`wxc971985892358997,`1800004561,`1900016021,`4200000010201709254114144003,`AQCAD8BrW68VlT4KDNP0Z7c4qUGm,`,`JSAPI,`SUCCESS,`CFT,`CNY,`0.02,`0.00,`0,`0,`0.00,`0.00,`,`,`广东省非税微信缴费,`0.00000,`0.00%,`440000,`1713372150,`118610002,`1,`test_470690267
`2017-09-25 11:58:35,`wxc971985892358997,`1800004561,`1900016021,`4200000012201709254136555152,`AQCAkL-XW69fTTcKDNP0Z7dYl29t,`,`JSAPI,`SUCCESS,`CFT,`CNY,`0.02,`0.00,`0,`0,`0.00,`0.00,`,`,`广东省非税微信缴费,`0.00000,`0.00%,`440000,`1713372148,`118610002,`1,`test_470690266
`2017-09-25 14:33:16,`wxc971985892358997,`1800004561,`1900016021,`4200000023201709254163519598,`AQCA9J_eW68VlT4KDNP0Z7c4qUGm,`,`JSAPI,`SUCCESS,`CFT,`CNY,`0.02,`0.00,`0,`0,`0.00,`0.00,`,`,`广东省非税微信缴费,`0.00000,`0.00%,`440000,`1713372154,`118610002,`1,`test_470690267
总交易单数,总交易额,总退款金额,总企业红包退款金额,手续费总金额
`6,`0.12,`0.00,`0.00,`0.00000

# 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
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;