\n\n\n\n\n\n","/assets.swgg.swagger.json":"{\n \"basePath\": \"/\",\n \"externalDocs\": {\n \"description\": \"find out more about wechat's web-apis\",\n \"url\": \"http://open.wechat.com/cgi-bin/newreadtemplate?t=overseas_open/documentation\"\n },\n \"info\": {\n \"description\": \"this zero-dependency package will provide a swagger-client for wechat-all's web-apis, with a working web-demo\",\n \"title\": \"swgg-wechat-all\",\n \"version\": \"2018.1.19\",\n \"x-swgg-downloadStandaloneApp\": \"https://kaizhu256.github.io/node-swgg-wechat-all/build..beta..travis-ci.org/app/assets.app.js\",\n \"x-swgg-homepage\": \"https://github.com/kaizhu256/node-swgg-wechat-all\"\n },\n \"parameters\": {\n \"appid.required\": {\n \"default\": \"wx8888888888888888\",\n \"description\": \"Official Account ID. Specifies Official Account ID assigned by WeChat.\",\n \"in\": \"formData\",\n \"name\": \"appid\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"attach\": {\n \"default\": \"User-Defined Data\",\n \"description\": \"Additional Data. Allow vendors an additional field to be returned in the payment notification after submitting a payment to the Query Order API.\",\n \"in\": \"formData\",\n \"name\": \"attach\",\n \"type\": \"string\"\n },\n \"auth_code.required\": {\n \"default\": \"120061098828009406\",\n \"description\": \"Authorization Code. Specifies authorization code for scanning a barcode/QR Code on Quick Pay. Note: The WeChat barcodes are constructed with 18 numbers, with the start value of 10, 11, 12, 13, 14 or 15.\",\n \"in\": \"formData\",\n \"name\": \"auth_code\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"body.required\": {\n \"default\": \"Pay for QQ Coins\",\n \"description\": \"Item Description.\",\n \"in\": \"formData\",\n \"name\": \"body\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"date.required\": {\n \"default\": \"20150807\",\n \"description\": \"Date. In the format of yyyyMMdd. For example, December 25, 2009 is expressed as 20091225 in the time zone (GMT+8).\",\n \"in\": \"formData\",\n \"name\": \"date\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"detail\": {\n \"default\": \"{\\\"goods_detail\\\":[{\\\"goods_id\\\":\\\"iphone6s_1 6G\\\",\\\"wxpay_goods_id\\\":\\\"100 1\\\",\\\"goods_name\\\":\\\"iPhone 6s 16G\\\",\\\"goods_num\\\":1,\\\"price\\\":528800,\\\"goods_category\\\":\\\"1234 56\\\",\\\"body\\\":\\\"苹果手机\\\"},{\\\"goods_id\\\":\\\"iphone6s_3 2G\\\",\\\"wxpay_goods_id\\\":\\\"100 2\\\",\\\"goods_name\\\":\\\"iPhone 6s 32G\\\",\\\"quantity\\\":1,\\\"price\\\":608800,\\\"goods_category\\\":\\\"1237 89\\\",\\\"body\\\":\\\"苹果手机\\\"}]}\",\n \"description\": \"Items Details. Detailed product list described in JSON format. Please use CDATA tag to protect the JSON string when generating signature.\",\n \"format\": \"json\",\n \"in\": \"formData\",\n \"name\": \"detail\",\n \"type\": \"string\"\n },\n \"device_info\": {\n \"default\": \"013467007045764\",\n \"description\": \"Device ID. Specifies terminal device ID assigned by WeChat Payment (such as store number as defined by the vendor).\\nNote: If the payment is performed based on PC web page or WeChat Web-based page, please submit the field value as WEB.\",\n \"in\": \"formData\",\n \"name\": \"device_info\",\n \"type\": \"string\"\n },\n \"fee_type.required\": {\n \"default\": \"USD\",\n \"description\": \"Currency Type. ISO-4217 standard compliant and be described by three characters based code.\",\n \"in\": \"formData\",\n \"name\": \"fee_type\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"goods_tag\": {\n \"description\": \"Item Label. Specifies label of goods, which is a parameter in the coupon feature for businesses.\",\n \"in\": \"formData\",\n \"name\": \"goods_tag\",\n \"type\": \"string\"\n },\n \"mch_id.required\": {\n \"default\": \"1900000109\",\n \"description\": \"Vendor ID. Specifies vendor ID assigned by WeChat Payment.\",\n \"in\": \"formData\",\n \"name\": \"mch_id\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"nonce_str.required\": {\n \"default\": \"5K8264ILTKCH16CQ2502SI8ZNMTM67VS\",\n \"description\": \"Random string. 32 characters or fewer.\",\n \"in\": \"formData\",\n \"name\": \"nonce_str\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"notify_url.required\": {\n \"default\": \"http://wxpay.weixin.qq.com/pub_v2/pay/notify.v2.php\",\n \"description\": \"Notification URL. Specifies callback address for receiving WeChat payment notifications.\",\n \"in\": \"path\",\n \"name\": \"notify_url\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"out_refund_no.required\": {\n \"default\": \"1217752501201407033233368018\",\n \"description\": \"Specifies the internal refund number, which is unique in the system. A single transaction can be processed as multiple partial refunds, with the total sum of the partial refunds being equal to the original one.\",\n \"in\": \"formData\",\n \"name\": \"out_refund_no\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"out_trade_no.required\": {\n \"default\": \"1217752501201407033233368018\",\n \"description\": \"Vendor Order Number. Specifies internal order number created by the Vendor’s system.\",\n \"in\": \"formData\",\n \"name\": \"out_trade_no\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"refund_fee.required\": {\n \"default\": 100,\n \"description\": \"Refund Amount. Specifies the total refund amount for a transaction. The units are expressed in cents and shall be an integer.\",\n \"in\": \"formData\",\n \"name\": \"refund_fee\",\n \"required\": true,\n \"type\": \"integer\"\n },\n \"refund_fee_type\": {\n \"default\": \"USD\",\n \"description\": \"Currency Type. ISO-4217 standard compliant and be described by three characters based code. The refund currency type must be same with the bid currency type.\",\n \"in\": \"formData\",\n \"name\": \"refund_fee_type\",\n \"type\": \"string\"\n },\n \"return_code.required\": {\n \"default\": \"SUCCESS\",\n \"description\": \"Return Status Code. SUCCESS or FAIL. Specifies communicating label instead of transaction label. The status of a transaction is determined by the value oftrade_state.\",\n \"enum\": [\n \"SUCCESS\",\n \"FAIL\"\n ],\n \"in\": \"formData\",\n \"name\": \"return_code\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"return_msg\": {\n \"default\": \"Signature failure\",\n \"description\": \"Return Data. If not empty, this is the error description\\nSignature failure\\nParameter format checking error\",\n \"in\": \"formData\",\n \"name\": \"return_msg\",\n \"type\": \"string\"\n },\n \"sign.required\": {\n \"default\": \"C380BEC2BFD727A4B6845133519F3AD6\",\n \"description\": \"Signature.\",\n \"in\": \"formData\",\n \"name\": \"sign\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"sign_type\": {\n \"default\": \"MD5\",\n \"description\": \"Sign type. Currently HMAC-SHA256 and MD5 are supported, default is MD5. This parameter must be submitted if HMAC-SHA256 is chosen.\",\n \"enum\": [\n \"HMAC-SHA256\",\n \"MD5\"\n ],\n \"in\": \"formData\",\n \"name\": \"sign_type\",\n \"type\": \"string\"\n },\n \"spbill_create_ip.required\": {\n \"default\": \"8.8.8.8\",\n \"description\": \"Terminal IP. Specifies machine IP that calls the WeChat Payment API.\",\n \"in\": \"formData\",\n \"name\": \"spbill_create_ip\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"sub_appid\": {\n \"default\": \"wx8888888888888888\",\n \"description\": \"Sub Official Account ID. Specifies Sub Official Account ID assigned by WeChat.\",\n \"in\": \"formData\",\n \"name\": \"sub_appid\",\n \"type\": \"string\"\n },\n \"sub_mch_id.required\": {\n \"default\": \"1900000109\",\n \"description\": \"Sub Vendor ID. Specifies Sub vendor ID assigned by WeChat Payment.\",\n \"in\": \"formData\",\n \"name\": \"sub_mch_id\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"time\": {\n \"default\": \"20091225091010\",\n \"description\": \"Specifies the transaction creation time in the format yyyyMMddHHmmss, such as 20091225091010 for Dec 25, 2009 09:10:10 (UTC+08).\",\n \"in\": \"formData\",\n \"name\": \"time\",\n \"type\": \"string\"\n },\n \"total_fee.required\": {\n \"default\": 888,\n \"description\": \"Bid price. Specifies total order amount. The units are expressed in cents as integers.\",\n \"in\": \"formData\",\n \"name\": \"total_fee\",\n \"required\": true,\n \"type\": \"integer\"\n },\n \"transaction_id.required\": {\n \"default\": \"013467007045764\",\n \"description\": \"WeChat Order Number. Specifies WeChat payment order id number.\",\n \"in\": \"formData\",\n \"name\": \"transaction_id\",\n \"required\": true,\n \"type\": \"string\"\n },\n \"wechatPayApiKey\": {\n \"default\": \"xxxxxxxx\",\n \"description\": \"This key is created for transaction signatures and is retained in the Vendor’s backend and WeChat payment system, and should not be made available publicly or on the Internet. The Vendor should keep this key secured and avoid disclosing it to others. Vendors may configure the key according to the email instructions.\",\n \"in\": \"formData\",\n \"name\": \"key\",\n \"type\": \"string\",\n \"x-swgg-apiKey\": true\n }\n },\n \"paths\": {\n \"/pay/closeorder\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Close Order.\\n\\nThis API needs to be called before a vendor wants to create a new order due to the Payer failing to pay for an order. The original order will be closed in order to avoid repeat payment. After an order is created in the WeChat payment system, if the Payer doesn't pay within the required time, no further operation can be performed in the system. To prevent the Payer from proceeding with their order, this API is called to close the order.\",\n \"operationId\": \"_2Fpay_2Fcloseorder_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/downloadbill\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Download Transaction History.\\n\\nThis API is used to help the Vendors download their transaction record history including missing orders, and can be used to find unmatched data between vendors and WeChat caused by system error. By downloading transaction history and doing Reconciliation, the Vendor can correct the status of their orders in a timely fashion.\",\n \"operationId\": \"_2Fpay_2Fdownloadbill_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/device_info\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"default\": \"20140603\",\n \"description\": \"Reconciliation Start Date. Specifies date of the transactions to be downloaded in the format of yyyymmdd, such as 20140603 for June 3, 2014.\",\n \"in\": \"formData\",\n \"name\": \"bill_date\",\n \"required\": true,\n \"type\": \"string\"\n },\n {\n \"default\": \"ALL\",\n \"description\": \"Bill Type.\\nALL: Return all order data from the specified date. bill_type is set to ALL by default.\\nSUCCESS: Return successfully paid orders only.\\nREFUND: Return refunded orders only.\",\n \"enum\": [\n \"ALL\",\n \"SUCESS\",\n \"REFUND\"\n ],\n \"in\": \"formData\",\n \"name\": \"bill_type\",\n \"required\": true,\n \"type\": \"string\"\n },\n {\n \"default\": \"GZIP\",\n \"description\": \"Compress Type. Fixed value: GZIP. It will return a .gzip package if this parameter is set, unless it will return the data flow.\",\n \"in\": \"formData\",\n \"name\": \"tar_type\",\n \"type\": \"string\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-notRequired\": [\n \"sub_mch_id\"\n ],\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/micropay\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Submit Quick Pay.\\n\\nAfter the Cashier scans a bar or QR code on the Quick Pay page shown by the Payer, the payment parameters are transferred to the Vendor’s backend. The Vendor’s backend calls the Submit Quick Pay API to initiate a payment.\",\n \"operationId\": \"_2Fpay_2Fmicropay_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/device_info\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"$ref\": \"#/parameters/body.required\"\n },\n {\n \"$ref\": \"#/parameters/detail\"\n },\n {\n \"$ref\": \"#/parameters/attach\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n },\n {\n \"$ref\": \"#/parameters/fee_type.required\"\n },\n {\n \"$ref\": \"#/parameters/total_fee.required\"\n },\n {\n \"$ref\": \"#/parameters/spbill_create_ip.required\"\n },\n {\n \"$ref\": \"#/parameters/goods_tag\"\n },\n {\n \"$ref\": \"#/parameters/auth_code.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/orderquery#out_trade_no.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Query Order.\\n\\nThis API allows inquiry of all payment orders made from WeChat. After receiving a status code using this API, vendors can proceed with the next step in service logic. The following are situations when to use the Query Order API: 1. The Vendor doesn’t receive any payment due to an exception in the Vendor's backend, network or server; 2. A system error or unknown transaction status is returned after calling the payment interface; 3. USERPAYING status is returned after calling the Quick Pay API; 4. To confirm payment status before calling the Close Order API or Revoke Order API;\",\n \"operationId\": \"_2Fpay_2Forderquery_23out_trade_no.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/orderquery#transaction_id.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Query Order.\\n\\nThis API allows inquiry of all payment orders made from WeChat. After receiving a status code using this API, vendors can proceed with the next step in service logic. The following are situations when to use the Query Order API: 1. The Vendor doesn’t receive any payment due to an exception in the Vendor's backend, network or server; 2. A system error or unknown transaction status is returned after calling the payment interface; 3. USERPAYING status is returned after calling the Quick Pay API; 4. To confirm payment status before calling the Close Order API or Revoke Order API;\",\n \"operationId\": \"_2Fpay_2Forderquery_23transaction_id.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/transaction_id.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/queryexchagerate\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Query Exchange Rate.\\n\\nThe interface could inquiry the exchange rate which Wechat Payment used in real time. The rate is updated once each day at 10 a.m. in the time zone (GMT+8).\",\n \"operationId\": \"_2Fpay_2Fqueryexchagerate_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/fee_type.required\"\n },\n {\n \"$ref\": \"#/parameters/date.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-notRequired\": [\n \"sub_mch_id\"\n ],\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/refundquery#out_refund_no.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Vendor Refund Number.\",\n \"operationId\": \"_2Fpay_2Frefundquery_23out_refund_no.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"$ref\": \"#/parameters/out_refund_no.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/refundquery#out_trade_no.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Query Refund.\\n\\nAfter submitting Submit Refund, this API can be called to check the refund status. After submitting a refund, there may be a delay in processing the refund: 20 minutes for refunding to Balance and 3 working days for refunding to a bank card.\",\n \"operationId\": \"_2Fpay_2Frefundquery_23out_trade_no.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/refundquery#refund_id.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Query Refund.\\n\\nAfter submitting Submit Refund, this API can be called to check the refund status. After submitting a refund, there may be a delay in processing the refund: 20 minutes for refunding to Balance and 3 working days for refunding to a bank card.\",\n \"operationId\": \"_2Fpay_2Frefundquery_23refund_id.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"default\": \"013467007045764\",\n \"description\": \"WeChat Refund Number. This field will supply the refund_id, out_refund_no, out_trade_no, or transaction_id. Their priority is as shown below:\\n\\nrefund_id>out_refund_no>transaction_id>o ut_trade_no.\",\n \"in\": \"formData\",\n \"name\": \"refund_id\",\n \"required\": true,\n \"type\": \"string\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/refundquery#transaction_id.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Query Refund.\\n\\nAfter submitting Submit Refund, this API can be called to check the refund status. After submitting a refund, there may be a delay in processing the refund: 20 minutes for refunding to Balance and 3 working days for refunding to a bank card.\",\n \"operationId\": \"_2Fpay_2Frefundquery_23transaction_id.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"$ref\": \"#/parameters/transaction_id.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/settlementquery\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Querying Dettled Funds.\\n\\nThis API helps query the details of settled funds.\",\n \"operationId\": \"_2Fpay_2Fsettlementquery_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"default\": 1,\n \"description\": \"Settlement Status. Indicates the fund has been settled or is still outstanding:\\n1 - settled.\\n2 - outstanding.\",\n \"enum\": [\n 1,\n 2\n ],\n \"in\": \"formData\",\n \"name\": \"usetag\",\n \"required\": true,\n \"type\": \"integer\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"default\": 1,\n \"description\": \"Offset.\",\n \"in\": \"formData\",\n \"name\": \"offset\",\n \"required\": true,\n \"type\": \"integer\"\n },\n {\n \"default\": 10,\n \"description\": \"Max.\",\n \"in\": \"formData\",\n \"name\": \"limit\",\n \"required\": true,\n \"type\": \"integer\"\n },\n {\n \"in\": \"formData\",\n \"name\": \"date_start\",\n \"type\": \"string\",\n \"x-swgg-$ref\": \"#/parameters/date.required\"\n },\n {\n \"in\": \"formData\",\n \"name\": \"date_end\",\n \"type\": \"string\",\n \"x-swgg-$ref\": \"#/parameters/date.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/pay/unifiedorder\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Unified Order.\\n\\nFor scenarios other than the Quick Pay method, the Vendor’s backend calls this API to create an advance transaction in the WeChat payment service backend, and initiates the payment process via payment by QR Code. JSAPI, App and other payment methods after the order is submitted successfully.\",\n \"operationId\": \"_2Fpay_2Funifiedorder_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/device_info\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"$ref\": \"#/parameters/body.required\"\n },\n {\n \"$ref\": \"#/parameters/detail\"\n },\n {\n \"$ref\": \"#/parameters/attach\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n },\n {\n \"$ref\": \"#/parameters/fee_type.required\"\n },\n {\n \"$ref\": \"#/parameters/total_fee.required\"\n },\n {\n \"$ref\": \"#/parameters/spbill_create_ip.required\"\n },\n {\n \"in\": \"formData\",\n \"name\": \"time_start\",\n \"type\": \"string\",\n \"x-swgg-$ref\": \"#/parameters/time\"\n },\n {\n \"in\": \"formData\",\n \"name\": \"time_expire\",\n \"type\": \"string\",\n \"x-swgg-$ref\": \"#/parameters/time\"\n },\n {\n \"$ref\": \"#/parameters/goods_tag\"\n },\n {\n \"$ref\": \"#/parameters/notify_url.required\"\n },\n {\n \"default\": \"JSAPI\",\n \"description\": \"Transaction Type. Set to JSAPI, NATIVE, or APP.\",\n \"enum\": [\n \"JSAPI\",\n \"NATIVE\",\n \"APP\"\n ],\n \"in\": \"formData\",\n \"name\": \"trade_type\",\n \"required\": true,\n \"type\": \"string\"\n },\n {\n \"default\": \"12235413214070356458058\",\n \"description\": \"Product ID. This field is only required when trade_type is NATIVE. This ID contains the product ID as set by the Vendor.\",\n \"in\": \"formData\",\n \"name\": \"product_id\",\n \"type\": \"string\"\n },\n {\n \"default\": \"oUpF8uMuAJO_M2pxb1Q9zNjWeS6o\",\n \"description\": \"User Tag. This field is only required when trade_type is JSAPI. It is the only user identification under the current appid. About how to get openid, please refer to\\nhttp://admin.wechat.com/wiki/index.php ?title=User_Profile_via_Web\",\n \"in\": \"formData\",\n \"name\": \"openid\",\n \"type\": \"string\"\n },\n {\n \"default\": \"oUpF8uMuAJO_M2pxb1Q9zNjWeS6o\",\n \"description\": \"Sub User Tag. This field is only required when trade_type is JSAPI. It is the only user identification under the current appid. Choose one of openid or sub_openid to submit, if sub_openid is chosen, sub_appid also need to be submitted.\",\n \"in\": \"formData\",\n \"name\": \"sub_openid\",\n \"type\": \"string\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/payitil/report\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Report Speed Testing.\\n\\nThis API is used to assist the Vendors in improving overall service quality when they call the WeChat payment APIs. With this API, vendors obtain relevant returned data and response duration. Based on the Vendor's uplink network speed, the WeChat payment system optimizes its networking deployment, so as to continuously improve service reliability and speed.\",\n \"operationId\": \"_2Fpayitil_2Freport_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/device_info\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"default\": \"https://api.mch.wei xin.qq.com/pay/unifiedorder\",\n \"description\": \"Interface URL. Complete interface URL to be reported is similar to the following:\\nhttps://api.mch.weixin.qq.com/pay/unifiedorder\\n\\nWhen Quick Pay is used, in order to analyze the overall duration of a single service with vendors, WeChat requires a report for each Quick Pay service call made in either mode 1 or mode 2. The report URL is as below:\\nhttps://api.mch.weixin.qq.com/pay/micropay/total\\n\\nFor other payment methods, calling and reporting is only required once.\",\n \"in\": \"formData\",\n \"name\": \"interface_url\",\n \"required\": true,\n \"type\": \"string\"\n },\n {\n \"default\": 1000,\n \"description\": \"API Execute Duration. Specifies the duration for calling the API. The units are expressed in milliseconds.\",\n \"in\": \"formData\",\n \"name\": \"execute_tim\",\n \"required\": true,\n \"type\": \"integer\"\n },\n {\n \"$ref\": \"#/parameters/return_code.required\"\n },\n {\n \"$ref\": \"#/parameters/return_msg\"\n },\n {\n \"default\": \"SUCCESS\",\n \"description\": \"Service Result. SUCCESS or FAIL.\",\n \"enum\": [\n \"SUCCESS\",\n \"FAIL\"\n ],\n \"in\": \"formData\",\n \"name\": \"result_code\",\n \"required\": true,\n \"type\": \"string\"\n },\n {\n \"default\": \"SYSTEMERROR\",\n \"description\": \"Error Code. ORDERNOTEXIST: Order does not exist.\",\n \"in\": \"formData\",\n \"name\": \"err_code\",\n \"type\": \"string\"\n },\n {\n \"default\": \"System error\",\n \"description\": \"Error Code Description. Describes result data.\",\n \"in\": \"formData\",\n \"name\": \"err_code_des\",\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n },\n {\n \"default\": \"8.8.8.8\",\n \"description\": \"Access Interface IP. Specifies the machine IP used when calling this interface.\",\n \"in\": \"formData\",\n \"name\": \"user_ip\",\n \"required\": true,\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/parameters/time\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-notRequired\": [\n \"appid\",\n \"out_trade_no\"\n ],\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/secapi/pay/refund#out_trade_no.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Submit Refund.\\n\\nFor a period after a payment transaction has been completed and a refund is required by either the Payer or Vendor, the Vendor can refund the Payer via this API. After the WeChat payment system receives and verifies the refund request successfully, the Payer will be refunded with the request refund amount (less than or equal to the original payment amount) according to the refund rules.\",\n \"operationId\": \"_2Fsecapi_2Fpay_2Frefund_23out_trade_no.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n },\n {\n \"$ref\": \"#/parameters/out_refund_no.required\"\n },\n {\n \"$ref\": \"#/parameters/total_fee.required\"\n },\n {\n \"$ref\": \"#/parameters/refund_fee.required\"\n },\n {\n \"$ref\": \"#/parameters/refund_fee_type\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/secapi/pay/refund#transaction_id.required\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Submit Refund.\\n\\nFor a period after a payment transaction has been completed and a refund is required by either the Payer or Vendor, the Vendor can refund the Payer via this API. After the WeChat payment system receives and verifies the refund request successfully, the Payer will be refunded with the request refund amount (less than or equal to the original payment amount) according to the refund rules.\",\n \"operationId\": \"_2Fsecapi_2Fpay_2Frefund_23transaction_id.required_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n },\n {\n \"$ref\": \"#/parameters/transaction_id.required\"\n },\n {\n \"$ref\": \"#/parameters/out_refund_no.required\"\n },\n {\n \"$ref\": \"#/parameters/total_fee.required\"\n },\n {\n \"$ref\": \"#/parameters/refund_fee.required\"\n },\n {\n \"$ref\": \"#/parameters/refund_fee_type\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/secapi/pay/reverse\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Revoke Order.\\n\\nWhen a payment transaction isn't successfully returned or the payment system times out, this API is called to cancel the transaction. After revoking, the successful order will be refunded, while the failed order will be closed.\",\n \"operationId\": \"_2Fsecapi_2Fpay_2Freverse_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/transaction_id.required\"\n },\n {\n \"$ref\": \"#/parameters/out_trade_no.required\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-notRequired\": [\n \"transaction_id\"\n ],\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/tools/shorturl\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"Short URL Conversion.\\n\\nThis API is used for the URL embedded in a QR code when using native payment method 1 and converts it into short URL (weixin://wxpay/s/XXXXXX), so as to reduce data volume, speed up scanning, and improve accuracy.\",\n \"operationId\": \"_2Ftools_2Fshorturl_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/appid.required\"\n },\n {\n \"$ref\": \"#/parameters/mch_id.required\"\n },\n {\n \"$ref\": \"#/parameters/sub_appid\"\n },\n {\n \"$ref\": \"#/parameters/sub_mch_id.required\"\n },\n {\n \"default\": \"weixin://wxpay/bizpay url?sign=XXXXX&ap pid=XXXXX&mch_id =XXXXX&product_id =XXXXXX&time_sta mp=XXXXXX&nonce _str=XXXXX\",\n \"description\": \"Long URL. Specifies the URL to be converted. The signature keeps original string and uses URL encode for transferring data.\",\n \"in\": \"formData\",\n \"name\": \"long_url\",\n \"required\": true,\n \"type\": \"string\"\n },\n {\n \"$ref\": \"#/parameters/nonce_str.required\"\n },\n {\n \"$ref\": \"#/parameters/sign.required\"\n },\n {\n \"$ref\": \"#/parameters/sign_type\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n },\n \"/{notify_url}\": {\n \"post\": {\n \"consumes\": [\n \"application/x-www-form-urlencoded\"\n ],\n \"description\": \"General Payment Result Notification.\\n\\nAfter completing a payment, the WeChat payment system will send the relevant payment result and user information to the Vendor. When this happens, the Vendor’s backend will need to receive the result and return a reply to the WeChat payment system.\",\n \"operationId\": \"_2F_7Bnotify_url_7D_20POST\",\n \"parameters\": [\n {\n \"$ref\": \"#/parameters/notify_url.required\"\n },\n {\n \"$ref\": \"#/parameters/return_code.required\"\n },\n {\n \"$ref\": \"#/parameters/return_msg\"\n }\n ],\n \"responses\": {\n \"default\": {\n \"description\": \"default response\"\n }\n },\n \"tags\": [\n \"wechat-pay\"\n ],\n \"x-swgg-consumes0\": \"application/xml\",\n \"x-swgg-host\": \"api.mch.weixin.qq.com\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n }\n },\n \"schemes\": [\n \"https\"\n ],\n \"swagger\": \"2.0\",\n \"tags\": [\n {\n \"description\": \"https://pay.weixin.qq.com/wechatpay_guide/help_docs.shtml\",\n \"name\": \"wechat-pay\",\n \"x-swgg-tags0\": \"wechat-pay\"\n }\n ],\n \"x-swgg-operationIdFromPath\": true,\n \"x-swgg-tags0-override\": {\n \"wechat-pay\": {\n \"externalDocs\": {\n \"description\": \"find out more about wechat-pay's web-apis\",\n \"url\": \"https://pay.weixin.qq.com/wechatpay_guide/help_docs.shtml\"\n }\n }\n }\n}\n"},"env":{"NODE_ENV":"test","npm_package_description":"this zero-dependency package will provide a swagger-client for wechat-all's web-apis, with a working web-demo","npm_package_homepage":"https://github.com/kaizhu256/node-swgg-wechat-all","npm_package_name":"swgg-wechat-all","npm_package_nameLib":"swgg_wechat_all","npm_package_version":"2018.1.19"}}});