Class ProfitSharingApi


  • public class ProfitSharingApi
    extends MchApi
    微信商户平台分账接口(直连商户/服务商)
    Since:
    weixin4j-pay 1.1.0
    Author:
    kit (kit.li@qq.com)
    • Constructor Detail

    • Method Detail

      • addReceiver

        public ReceiverResult addReceiver​(Receiver receiver)
                                   throws com.foxinmy.weixin4j.exception.WeixinException
        添加分账接收方 服务商代子商户发起添加分账接收方请求,后续可通过发起分账请求将结算后的钱分到该分账接收方。
        Parameters:
        receiver - 分帐接收方
        Returns:
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        Receiver, ReceiverResult, 添加分账接收方
      • removeReceiver

        public ReceiverResult removeReceiver​(Receiver receiver)
                                      throws com.foxinmy.weixin4j.exception.WeixinException
        删除分账接收方 商户发起删除分账接收方请求,删除后不支持将结算后的钱分到该分账接收方。
        Parameters:
        receiver - 分帐接收方
        Returns:
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        Receiver, ReceiverResult, 删除分账接收方
      • profitSharing

        public ProfitSharingResult profitSharing​(String transactionId,
                                                 String outOrderNo,
                                                 List<ReceiverProfit> receivers,
                                                 Boolean multi)
                                          throws com.foxinmy.weixin4j.exception.WeixinException
        请求分帐
        Parameters:
        transactionId - 微信订单号
        outOrderNo - 商户分帐单号
        receivers - 分帐接收方
        multi - 是否多次分帐,默认为单次分帐,即调用分帐成功后马上解冻剩余金额给商户,不需要完结分帐。多次分帐可多次调用分帐API,需调完结分帐结束分帐
        Returns:
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        请求单次分帐
      • profitSharingQuery

        public ProfitSharingResult profitSharingQuery​(String transactionId,
                                                      String outOrderNo)
                                               throws com.foxinmy.weixin4j.exception.WeixinException
        分帐查询
        Parameters:
        transactionId - 微信订单号
        outOrderNo - 商户分帐单号
        Returns:
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        分帐查询
      • profitSharingFinish

        public ProfitSharingResult profitSharingFinish​(String transactionId,
                                                       String outOrderNo,
                                                       String description)
                                                throws com.foxinmy.weixin4j.exception.WeixinException
        完结分账 1、不需要进行分账的订单,可直接调用本接口将订单的金额全部解冻给本商户 2、调用多次分账接口后,需要解冻剩余资金时,调用本接口将剩余的分账金额全部解冻给特约商户 3、已调用请求单次分账后,剩余待分账金额为零,不需要再调用此接口。
        Parameters:
        transactionId - 微信订单号
        outOrderNo - 商户分帐单号
        description - 分帐完结描述
        Returns:
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        完结分账
      • profitSharingReturn

        public ProfitSharingReturnResult profitSharingReturn​(ProfitId id,
                                                             String outReturnNo,
                                                             ReturnAccountType returnAccountType,
                                                             String returnAccount,
                                                             int returnAmount,
                                                             String description)
                                                      throws com.foxinmy.weixin4j.exception.WeixinException
        分账回退
        Parameters:
        id - 分帐单号
        outReturnNo - 商户回退单号
        returnAccountType - 回退方类型
        returnAccount - 回退方账号
        returnAmount - 回退金额
        description - 回退描述
        Returns:
        Throws:
        com.foxinmy.weixin4j.exception.WeixinException
        See Also:
        ProfitSharingReturnRequest, 分账回退