子商户结算

接口描述

平台商发起名下子商户的结算

基本信息

测试请求地址 https://cbtrxtest.helipay.com/cbtrx/rest/platMerchant/subMerchantSettle
请求地址 https://cbptrx.helipay.com/cbtrx/rest/platMerchant/subMerchantSettle
提交方式 采用POST方法提交,requestbody传值 Content-Type=[application/json;charset=UTF-8]
签名算法 UTF-8字符编码 SHA256签名 AES加密

请求参数

名称 参数 类型 必填 示例值 说明
商户编号 merchantNo String(10) 是 商户编号
平台商编号 platMerchantNo String(10) 否 商户对应的平台商,不填写默认为商户编号 商户对应的平台商,不填写默认为商户编号
订单号 orderNo String(64) 是 请求订单号,商户唯一 商户唯一
产品编码 productCode String(50) 是 PLATMERCHANTAPISETTLE PLATMERCHANTAPISETTLE
结算金额 settleAmount double 是 10.00 结算金额

响应参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 PLATMERCHANTAPISETTLE
商户订单号 orderNo String(64) 是 p_20170302185347 请求订单号
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
平台商户编号 platMerchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的平台商户编号
平台流水号 serialNumber String(32) 否 201702241400010002 合利宝-跨境系统生成的唯一交易流水号
响应码 errorCode String(10) 是 0000 0000 代表请求成功
响应信息 errorMessage String(200) 否 成功 响应信息 错误信息
响应时间 current String(20) 是 2018-04-01 12:00:00 格式yyyy-MM-dd HH:mm:ss
结算金额 settleAmount double 是 结算金额
结算状态 settleStatus String 是 结算状态

代码示例

  @RequestMapping(value = "/querySubMerchantSettle")
    public ModelAndView querySubMerchantSettle(@ModelAttribute @Valid BaseDTO request, BindingResult result) {
        ModelAndView mav = new ModelAndView();
        if (result.hasErrors()) {
            throw new CommonSystemException(CommonSystemException.ILLEGAL_DATA_REQUEST[0], result.getFieldError().getDefaultMessage());
        }
        HeliRequest heliRequest = remoteService.postRemoteInvoke(LoadPropertiesUtils.getProperty("querySubMerchantSettle"), JSONObject.toJSONString(encodeAndSign(request, request.getProductCode(), request.getPlatMerchantNo(), request.getMerchantNo())), HeliRequest.class);
        PlatMerchantAPISettleResponseForm responseForm = decode(heliRequest, PlatMerchantAPISettleResponseForm.class, request.getProductCode(), request.getPlatMerchantNo(), request.getMerchantNo());
        if (!CbDemoConstants.SUCCESS_CODE.equals(responseForm.getErrorCode())) {
            throw new CommonSystemException(responseForm.getErrorCode(), responseForm.getErrorMessage());
        }
        mav.setViewName("/plat/subMerchantSettleResult");
        mav.addObject("responseForm", responseForm);
        return mav;
    }
                                

                                

                                

错误码

错误码 错误码描述 解决方案

子商户结算查询

接口描述

子商户结算查询结果

基本信息

测试请求地址 https://cbtrxtest.helipay.com/cbtrx/rest/platMerchant/querySubMerchantSettle
请求地址 https://cbptrx.helipay.com/cbtrx/rest/platMerchant/querySubMerchantSettle
提交方式 采用POST方法提交,requestbody传值 Content-Type=[application/json;charset=UTF-8]
签名算法 UTF-8字符编码 SHA256签名 AES加密

请求参数

名称 参数 类型 必填 示例值 说明
商户编号 merchantNo String(10) 是 商户编号
平台商编号 platMerchantNo String(10) 否 商户对应的平台商,不填写默认为商户编号 商户对应的平台商,不填写默认为商户编号
订单号 orderNo String(64) 是 请求订单号,商户唯一 商户唯一
产品编码 productCode String(50) 是 PLATMERCHANTAPISETTLE PLATMERCHANTAPISETTLE

响应参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 PLATMERCHANTAPISETTLE
商户订单号 orderNo String(64) 是 p_20170302185347 请求订单号
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
平台商户编号 platMerchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的平台商户编号
平台流水号 serialNumber String(32) 否 201702241400010002 合利宝-跨境系统生成的唯一交易流水号
响应码 errorCode String(10) 是 0000 0000 代表请求成功
响应信息 errorMessage String(200) 否 成功 响应信息 错误信息
响应时间 current String(20) 是 2018-04-01 12:00:00 格式yyyy-MM-dd HH:mm:ss
结算金额 settleAmount double 是 结算金额
结算状态 settleStatus String 是 结算状态

代码示例

    @RequestMapping(value = "/querySubMerchantSettle")
    public ModelAndView querySubMerchantSettle(@ModelAttribute @Valid BaseDTO request, BindingResult result) {
        ModelAndView mav = new ModelAndView();
        if (result.hasErrors()) {
            throw new CommonSystemException(CommonSystemException.ILLEGAL_DATA_REQUEST[0], result.getFieldError().getDefaultMessage());
        }
        HeliRequest heliRequest = remoteService.postRemoteInvoke(LoadPropertiesUtils.getProperty("querySubMerchantSettle"), JSONObject.toJSONString(encodeAndSign(request, request.getProductCode(), request.getPlatMerchantNo(), request.getMerchantNo())), HeliRequest.class);
        PlatMerchantAPISettleResponseForm responseForm = decode(heliRequest, PlatMerchantAPISettleResponseForm.class, request.getProductCode(), request.getPlatMerchantNo(), request.getMerchantNo());
        if (!CbDemoConstants.SUCCESS_CODE.equals(responseForm.getErrorCode())) {
            throw new CommonSystemException(responseForm.getErrorCode(), responseForm.getErrorMessage());
        }
        mav.setViewName("/plat/subMerchantSettleResult");
        mav.addObject("responseForm", responseForm);
        return mav;
    }
                                

                                

                                

错误码

错误码 错误码描述 解决方案

子商户产品及费率修改

接口描述

子商户产品及费率修改

基本信息

测试请求地址 https://cbtrxtest.helipay.com/cbtrx/rest/platMerchant/modifySubMerchantProductAndFee
请求地址 https://cbptrx.helipay.com/cbtrx/rest/platMerchant/modifySubMerchantProductAndFee
提交方式 采用POST方法提交,requestbody传值 Content-Type=[application/json;charset=UTF-8]
签名算法 UTF-8字符编码 SHA256签名 AES加密

请求参数

名称 参数 类型 必填 示例值 说明
商户编号 merchantNo String(10) 是 商户编号
平台商编号 platMerchantNo String(10) 否 商户对应的平台商,不填写默认为商户编号 商户对应的平台商,不填写默认为商户编号
订单号 orderNo String(64) 是 请求订单号,商户唯一 商户唯一
产品编码 productCode String(50) 是 PLATMERCHANTAPISETTLE PLATMERCHANTAPISETTLE
子商户编号 subMerchantNo String(10) 是
待修改产品编码 openProduct[index].productCode String(20) 是
待修改产品比例费率 openProduct[index].percentageCost String(20) 是
待修改产品单笔手续费 openProduct[index].singleCost String(20) 是
待修改产品最小手续费 openProduct[index].minCost String(20) 是
待修改产品最小手续费最大手续费 openProduct[index].maxCost String(20) 是

响应参数

名称 参数 类型 必填 示例值 说明
产品编码 productCode String(20) 是 PLATMERCHANTREGIST
商户订单号 orderNo String(64) 是 p_20170302185347 请求订单号
商户编号 merchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的商户编号
平台商户编号 platMerchantNo String(10) 是 Me10000002 合利宝-跨境系统分配的平台商户编号
平台流水号 serialNumber String(32) 否 201702241400010002 合利宝-跨境系统生成的唯一交易流水号
响应码 errorCode String(10) 是 0000 0000 代表请求成功
响应信息 errorMessage String(200) 否 成功 响应信息 错误信息
响应时间 current String(20) 是 2018-04-01 12:00:00 格式yyyy-MM-dd HH:mm:ss

代码示例

    @RequestMapping(value = "/modifySubMerchantProductAndFee")
    public ModelAndView modifySubMerchantProductAndFee(@ModelAttribute @Valid SubMerchantProductAndFeeModifyRequestForm request, BindingResult result) {
        ModelAndView mav = new ModelAndView();
        if (result.hasErrors()) {
            throw new CommonSystemException(CommonSystemException.ILLEGAL_DATA_REQUEST[0], result.getFieldError().getDefaultMessage());
        }
        if(StringUtils.isBlank(request.getPlatMerchantNo())){
            throw new CommonSystemException(CommonSystemException.ILLEGAL_DATA_REQUEST[0], CommonSystemException.ILLEGAL_DATA_REQUEST[1]);
        }
        HeliRequest heliRequest = remoteService.postRemoteInvoke(LoadPropertiesUtils.getProperty("modifySubMerchantProductAndFee"), JSONObject.toJSONString(encodeAndSign(request, request.getProductCode(), request.getPlatMerchantNo(), request.getMerchantNo())), HeliRequest.class);
        SubMerchantProductAndFeeModifyResponseForm responseForm = decode(heliRequest, SubMerchantProductAndFeeModifyResponseForm.class, request.getProductCode(), request.getPlatMerchantNo(), request.getMerchantNo());
        if (!CbDemoConstants.SUCCESS_CODE.equals(responseForm.getErrorCode())) {
            throw new CommonSystemException(responseForm.getErrorCode(), responseForm.getErrorMessage());
        }
        mav.setViewName("/plat/modifySubMerchantProductAndFeeResult");
        mav.addObject("responseForm", responseForm);
        return mav;
    }
                                

                                

                                

错误码

错误码 错误码描述 解决方案