报关接口API

master
james.zhao 6 years ago
parent e2a21cf050
commit 2a0ef3b23b

@ -27,8 +27,8 @@
"JD_Online_Payment",
"Alipay_Online_Payment",
"HF_Online_Payment",
"CB_BankPay",
"SDKPayment",
"CustomsDeclare",
"CommonApi",
"GetExchange",
"OrderStatus",

@ -17,6 +17,9 @@
/**
* @apiDefine JSON JSON字段
*/
/**
* @apiDefine SUB_JSON JSON子字段
*/
/**
* @apiDefine ERROR_CODE 错误码
*/
@ -874,6 +877,75 @@
* @apiError (ERROR_CODE) ORDER_PAID 订单已支付
*
*/
/**
* @api {PUT} /api/v1.0/customs/partners/{partner_code}/declare/query/{client_report_id} 创建报关单
* @apiName declare_report
* @apiDescription
* 用于商户提交海关需要的订单附件信息仅支持微信和支付宝微信只支持一个月内的支付订单进行报关申请
*
* @apiVersion 1.0.0
* @apiGroup CustomsDeclare
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code 必填商户编码由4位大写字母或数字构成
* @apiParam (PathVariable) {String} client_report_id 必填商户申请报关单号要求同一商户唯一
* @apiUse Sign
* @apiParam (JSON) {String} order_id 必填商户支付订单号要求同一商户唯一
* @apiParam (JSON) {String} custom 必填海关编号 * <a href="https://www.royalpay.com.au/downloads/CustomsNO.xlsx">渠道海关编号</a>
* @apiParam (JSON) {String} mch_custom_id 必填商户在海关备案的编号
* @apiParam (JSON) {String} mch_custom_name 必填商户海关备案名称
* @apiParam (JSON) {JSONArray} sub_order 子订单(拆单)
*
* @apiParam (SUB_JSON) {String} sub_order_no 商户子订单号
* @apiParam (SUB_JSON) {String=CNY} fee_type=CNY 币种代码
* @apiParam (SUB_JSON) {Double} order_fee 子订单金额
* @apiParam (SUB_JSON) {Double} transport_fee 子订单物流金额
*
* @apiSuccess {String} report_id RoyalPay海关单号
* @apiSuccess {String} client_report_id 商户申请报关单号
* @apiSuccess {int} report_status 0:暂存,1:提交,2:提交失败,3:提交成功
* @apiSuccess {String} channel 支付渠道
* @apiSuccess {String} custom 海关编号
* @apiSuccess {String} mch_custom_no 商户在海关备案的编号
* @apiSuccess {String} mch_custom_name 商户海关备案名称
* @apiSuccess {String} order_id Royalpay订单号
* @apiSuccess {String} transaction_id 支付渠道订单号
* @apiSuccess {String} order_currency 币种
* @apiSuccess {Double} order_amount 订单金额
* @apiSuccess {String} report_time 报关时间
* @apiSuccess {String} creation_date 报关单创建时间
* @apiSuccess {String} last_update_date 更新时间
* @apiSuccess {String} error_code 错误代码
* @apiSuccess {String} error_msg 错误返回的信息描述
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
*
*/
/**
* @api {PUT} /api/v1.0/customs/partners/{partner_code}/declare/query/{report_id} 查询报关单
* @apiName declare_query
* @apiDescription
* 用于商户查询报关单号的状态
*
* @apiVersion 1.0.0
* @apiGroup CustomsDeclare
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code 必填商户编码由4位大写字母或数字构成
* @apiParam (PathVariable) {String} report_id 必填RoyalPay海关单号
* @apiUse Sign
*
* @apiSuccess {String} return_code 执行结果
* @apiSuccess {String} report_status 报关单状态
* @apiSuccess {String} report_id 商户申请报关单号
* @apiSuccess {String} return_msg 错误描述仅在执行结果不为SUCCESS情况下出现
* @apiSuccess {String} order_id RoyalPay订单号
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配
*
*/
function apis() {
}

@ -29,6 +29,7 @@
"HF_Online_Payment",
"CB_BankPay",
"SDKPayment",
"CustomsDeclare",
"CommonApi",
"GetExchange",
"OrderStatus",

@ -17,6 +17,9 @@
/**
* @apiDefine JSON JSON keys
*/
/**
* @apiDefine SUB_JSON JSON child keys
*/
/**
* @apiDefine ERROR_CODE Error Code
*/
@ -891,6 +894,75 @@
* @apiError (ERROR_CODE) ORDER_PAID Order has already been paid
*
*/
/**
* @api {PUT} /api/v1.0/customs/partners/{partner_code}/declare/query/{client_report_id} Create Declare No.
* @apiName declare_report
* @apiDescription
* Used to submit the attachment information of the order required by the merchant. WeChat and Alipay are only supported. WeChat only supports payment orders within one month for customs declaration.
*
* @apiVersion 1.0.0
* @apiGroup CustomsDeclare
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code Required, Partner code
* @apiParam (PathVariable) {String} client_report_id Required, Client declare ID
* @apiUse Sign
* @apiParam (JSON) {String} order_id Required, Partner order id
* @apiParam (JSON) {String} custom Required, Customs No. * <a href="https://www.royalpay.com.au/downloads/CustomsNO.xlsx">Customs No.</a>
* @apiParam (JSON) {String} mch_custom_id Required, Customs record id
* @apiParam (JSON) {String} mch_custom_name Required, Customs record name
* @apiParam (JSON) {JSONArray} sub_order Child orders
*
* @apiParam (SUB_JSON) {String} sub_order_no Child order ID
* @apiParam (SUB_JSON) {String=CNY} fee_type=CNY Currency
* @apiParam (SUB_JSON) {Double} order_fee Child Order Amount
* @apiParam (SUB_JSON) {Double} transport_fee Child Order Logistics Amount
*
* @apiSuccess {String} report_id RoyalPay declare ID
* @apiSuccess {String} client_report_id Client declare ID
* @apiSuccess {int} report_status 0:PROCCESSING,1:SUBMITED,2:FAIL,3:SUCCESS
* @apiSuccess {String} channel Channel
* @apiSuccess {String} custom Customs No.
* @apiSuccess {String} mch_custom_no Customs record ID
* @apiSuccess {String} mch_custom_name Customs record name
* @apiSuccess {String} order_id Royalpay Order ID
* @apiSuccess {String} transaction_id Channel Order ID
* @apiSuccess {String} order_currency Currency
* @apiSuccess {Double} order_amount Order Amount
* @apiSuccess {String} report_time Declare Time
* @apiSuccess {String} creation_date Create Time
* @apiSuccess {String} last_update_date Update Time
* @apiSuccess {String} error_code Error Code
* @apiSuccess {String} error_msg Error Description
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner
*
*/
/**
* @api {PUT} /api/v1.0/customs/partners/{partner_code}/declare/query/{report_id} Query Declare ID
* @apiName declare_query
* @apiDescription
* Used by the merchant to check the status of the customs declaration number.
*
* @apiVersion 1.0.0
* @apiGroup CustomsDeclare
* @apiHeader Accept application/json
* @apiHeader Content-Type application/json
* @apiParam (PathVariable) {String} partner_code Required, Partner code
* @apiParam (PathVariable) {String} report_id RequiredRoyalPay Declare ID
* @apiUse Sign
*
* @apiSuccess {String} return_code Execution result
* @apiSuccess {String} report_status Result status
* @apiSuccess {String} report_id Client declare ID
* @apiSuccess {String} return_msg Error Description
* @apiSuccess {String} order_id RoyalPay Order
*
* @apiUse GlobalError
* @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner
*
*/
function apis() {
}

Loading…
Cancel
Save