账户类


3.9 标准API账户管理

3.9.1 资金管理余额查询

查询资金管理中的账户余额

method: allinpay.shopoint.fundService.balanceQuery

version: 1.0

业务请求参数

字段名

字段名

参数类型

必填

最大长度

说明

取值

details

 

List

 

 

 

accountUserId

Integer

11

账户Id

accountUserId、externalCode、isPlatform必传一个

同时传accounUserId和其他选项时,以accountUserId为准

externalCode

String

30

店铺编号或者外部分佣方编号

同时传externalCode和isPlatform时,以externalCode为准

isPlatform

Boolean

5

大B

true/false

 

 

 

 

 

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

 

details

List

 

 

 

 

 

accountUserId

Integer

 

账户Id

 

 

accountSetNo

Integer

 

账户集编号

100001,余额户

2000000,营销户

referenceType

Integer

 

账户来源

11,大B

13,店铺

49,外部分佣方

referenceId

Integer

 

账户来源Id

账户来源为大B时,机构Id

账户来源为店铺时,店铺Id

账户来源为外部分佣方时,null

externalCode

String

 

店铺编号或者外部分佣方编号

 

shopName

String

 

店铺名称

 

accountName

String

 

账户名称

 

balance

BigDecimal

 

余额

和云商通余额保持一致

frozenBalance

BigDecimal

 

冻结金额

和云商通冻结金额保持一致

availableBalance

BigDecimal

 

可用余额

当前余额 – 当前冻结金额 + 今日退款金额 – 今日代付金额 

withdrawBalance

BigDecimal

 

可提现金额

根据T/D+n,推算出n - 1天前的余额 + 该天的退款金额– 该天的代付金额 - 当前冻结金额

 

请求示例

{

"details": [    

        {"accountUserId": 100},

        {"externalCode": "abc123"},

        {"isPlatform": true}

]

}

 

响应示例

{

    "code": 0,

    "data": [    

                {"accountUserId": 100, "externalCode": "abc123", "withdrawBalance": 100},

                {"accountUserId": 100, "externalCode": "abc123", "withdrawBalance": 100},

                {"accountUserId": 100, "externalCode": "abc123", "withdrawBalance": 100}

        ]

    },

    "token": "DlRXdIjEBLRLCJgwTP37sZW6ls--NflxVS2-KUHl"

}

 

3.9.3 资金管理提现

资金管理中过程中,完成提现。

注意:

  • 接口目前不支持资金托管模式。
  • 提现时间超过21点,可能会第二天到账
  • 提现发起后,如果中间户余额不足,会等到余额足的时候完成提现(如,第二天凌晨完成资金归集后)
  • 提现发起后,不会立即返回结果,可在下一个小时的30分以后,查询提现结果(如:10:55发起提现,在11:30查询结果)

method: allinpay.shopoint.fundService.withdraw

version: 1.0

业务请求参数

字段名

字段名

参数类型

必填

最大长度

说明

取值

orderId

 

String

60

订单号

 

details

 

List

 

 

 

accountUserId

Integer

11

账户Id

accountUserId、externalCode、isPlatform必传一个

同时传accounUserId和其他选项时,以accountUserId为准

externalCode

String

30

店铺编号或者外部分佣方编号

同时传externalCode和isPlatform时,以externalCode为准

isPlatform

Boolean

5

大B

true/false

withdrawAmount

BigDecimal

14

提现金额

 

summary

String

 

摘要

大B为结算通时,长度为100;

大B为其他类型时,长度为50

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

orderId

String

 

订单号

 

details

List

 

 

提现明细列表

 

 

accountUserId

Integer

 

账户Id

 

 

accountSetNo

Integer

 

账户集编号

100001,余额户

2000000,营销户

referenceType

Integer

 

账户来源

11,大B

13,店铺

49,外部分佣方

referenceId

Integer

 

账户来源Id

账户来源为大B时,机构Id

账户来源为店铺时,店铺Id

账户来源为外部分佣方时,null

externalCode

String

 

店铺编号或者外部分佣方编号

 

shopName

String

 

店铺名称

 

accountName

String

 

账户名称

 

withdrawTId

Integer

 

 

通联返回的提现交易流水号

withdrawAmount

BigDecimal

 

提现金额

实际到账金额

fee

BigDecimal

 

提现手续费

 

summary

String

 

摘要

大B为结算通时,长度为100;

大B为其他类型时,长度为50

withdrawStatus

Integer

 

提现状态

1,提现中

3,提现失败

withdrawStatusDesc

String

 

提现状态描述

1,提现中

3,提现失败原因

 

请求示例

{

"orderId": "1236158361962",

"details": [    

        {"accountUserId": 100, "withdrawAmount": 100},

        {"externalCode": "abc123", "withdrawAmount": 100},

        {"isPlatform": true, "withdrawAmount": 100}

]

}

 

响应示例

{

    "code": 0,

    "data": {

        "orderId": "1236158361962",

        "details": [    

                {"accountUserId": 100, "externalCode": "abc123", "withdrawAmount": 100},

                {"accountUserId": 100, "externalCode": "abc123", "withdrawAmount": 100},

                {"accountUserId": 100, "externalCode": "abc123", "withdrawAmount": 100}

        ]

    },

    "token": "DlRXdIjEBLRLCJgwTP37sZW6ls--NflxVS2-KUHl"

}

3.9.4 资金管理提现结果查询

资金管理中过程中,提现结果查询。

注意:

  • 提现时间超过21点,可能会第二天到账
  • 提现发起后,如果中间户余额不足,会等到余额足的时候完成提现(如,第二天凌晨完成资金归集后)
  • 提现发起后,不会立即返回结果,可在下一个小时的30分以后,查询提现结果(如:10:55发起提现,在11:30查询结果)
  • 后续每小时查询一次即可
  • 23点~7点之间不必查询结果,这个区间不会有任何状态变化

method: allinpay.shopoint.fundService.withdrawResultQuery

version: 1.0

业务请求参数

字段名

字段名

参数类型

必填

最大长度

说明

取值

orderId

 

String

60

订单号

 

业务响应参数

字段名

参数类型

必填

最大长度

说明

取值

code

Integer

 

返回码

0:表示成功;

3:表示失败,具体失败原因参见msg字段;

其他:参见4.1 公共返回码

msg

String

 

错误信息

 

data

orderId

String

 

订单号

 

details

List

 

 

提现明细列表

 

 

accountUserId

Integer

 

账户Id

 

 

accountSetNo

Integer

 

账户集编号

100001,余额户

2000000,营销户

referenceType

Integer

 

账户来源

11,大B

13,店铺

49,外部分佣方

referenceId

Integer

 

账户来源Id

账户来源为大B时,机构Id

账户来源为店铺时,店铺Id

账户来源为外部分佣方时,null

externalCode

String

 

店铺编号或者外部分佣方编号

 

shopName

String

 

店铺名称

 

accountName

String

 

账户名称

 

withdrawTId

Integer

 

 

通联返回的提现交易流水号

withdrawAmount

BigDecimal

 

提现金额

实际到账金额

fee

BigDecimal

 

提现手续费

 

summary

String

 

摘要

大B为结算通时,长度为100;

大B为其他类型时,长度为50

withdrawStatus

Integer

 

提现状态

1,提现中

2,交易成功

3,提现失败

withdrawStatusDesc

String

 

提现状态描述

1,提现中

2,交易成功

3,提现失败原因

 

请求示例

{

"orderId": "1236158361962"

}

 

响应示例

{

    "code": 0,

    "data": {

        "orderId": "1236158361962",

        "details": [    

                {"accountUserId": 100, "externalCode": "abc123", "withdrawAmount": 100},

                {"accountUserId": 100, "externalCode": "abc123", "withdrawAmount": 100},

                {"accountUserId": 100, "externalCode": "abc123", "withdrawAmount": 100}

        ]

    },

    "token": "DlRXdIjEBLRLCJgwTP37sZW6ls--NflxVS2-KUHl"

}


卜子超buzc 2025年4月15日 16:12 收藏文档