资金服务
快手小店资金管理API,提供完整的财务处理功能。支持账户余额查询、资金流水查询、提现管理、账单下载、保证金管理等核心功能,帮助商家全面掌控资金状况和财务流水。
异步资金服务
kwaixiaodian.client.services.funds.AsyncFundsService(client: AsyncBaseClient)
异步资金管理服务
提供账户资金查询、资金流水记录、提现管理、结算查询等功能。 支持完整的资金生命周期管理和财务对账功能。
初始化资金管理服务
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
client
|
AsyncBaseClient
|
异步基础客户端实例 |
必需 |
方法:
| 名称 | 描述 |
|---|---|
get_account_info |
获取账户资金信息。 |
apply_withdraw |
申请提现。 |
list_withdraw_records |
获取提现记录。 |
query_withdraw |
查询提现状态。 |
get_daily_bill |
获取日账单。 |
get_bill_batch_detail |
批量账单详情。 |
get_post_sales_bill_list |
售后账单列表。 |
query_financial_bill_list |
资金财务账单列表。 |
query_account_bills |
查询账户账单。 |
get_settled_bill_detail |
结算账单详情。 |
get_freight_insurance_list |
运费险列表。 |
get_pingan_bill |
平安账单。 |
get_statement_list |
对账单列表。 |
apply_invoice |
申请发票(非文件接口)。 |
audit_invoice_info |
审核发票信息。 |
apply_invoice_file |
申请发票文件。 |
Functions
get_account_info(access_token: str, uid: Optional[int] = None) -> FundsAccountInfoResponse
async
获取账户资金信息。
OpenAPI: open.funds.center.account.info (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterAccountInfoRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterAccountInfoRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsAccountInfoResponse |
FundsAccountInfoResponse
|
账户资金信息。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
apply_withdraw(access_token: str, withdraw_money: int, withdraw_no: Optional[str] = None, remark: Optional[str] = None, account_channel: Optional[int] = None, sub_merchant_id: Optional[str] = None, uid: Optional[int] = None) -> FundsWithdrawApplyResponse
async
申请提现。
OpenAPI: open.funds.center.withdraw.apply (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterWithdrawApplyRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterWithdrawApplyRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
withdraw_money
|
int
|
提现金额(分)。 |
必需 |
withdraw_no
|
Optional[str]
|
提现单号(可选)。 |
None
|
remark
|
Optional[str]
|
备注信息(可选)。 |
None
|
account_channel
|
Optional[int]
|
出账通道(可选)。 |
None
|
sub_merchant_id
|
Optional[str]
|
子商户 ID(可选)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsWithdrawApplyResponse |
FundsWithdrawApplyResponse
|
提现申请结果。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
list_withdraw_records(access_token: str, limit: Optional[int] = None, page: Optional[int] = None, create_time_start: Optional[int] = None, create_time_end: Optional[int] = None, account_channel: Optional[int] = None, sub_merchant_id: Optional[str] = None, uid: Optional[int] = None) -> FundsWithdrawRecordResponse
async
获取提现记录。
OpenAPI: open.funds.center.wirhdraw.record.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterWirhdrawRecordListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterWirhdrawRecordListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
limit
|
Optional[int]
|
每页大小。 |
None
|
page
|
Optional[int]
|
页码。 |
None
|
create_time_start
|
Optional[int]
|
开始时间(时间戳)。 |
None
|
create_time_end
|
Optional[int]
|
结束时间(时间戳)。 |
None
|
account_channel
|
Optional[int]
|
出账通道。 |
None
|
sub_merchant_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsWithdrawRecordResponse |
FundsWithdrawRecordResponse
|
提现记录响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
Example
records = await funds_service.list_withdraw_records(
access_token="your_token",
withdraw_status=WithdrawStatus.SUCCESS,
page_size=30
)
if records.result and records.result.items:
for record in records.result.items:
print(f"提现单号: {record.withdraw_no}")
print(f"提现金额: {record.withdraw_yuan}元")
print(f"实际到账: {record.actual_yuan}元")
print(f"状态: {record.withdraw_status.name}")
query_withdraw(access_token: str, withdraw_no: str, uid: Optional[int] = None) -> FundsWithdrawQueryResponse
async
查询提现状态。
OpenAPI: open.funds.center.get.withdraw.result (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterGetWithdrawResultRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterGetWithdrawResultRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
withdraw_no
|
str
|
提现单号。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsWithdrawQueryResponse |
FundsWithdrawQueryResponse
|
提现状态查询响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
Example
withdraw = await funds_service.query_withdraw(
access_token="your_token",
withdraw_no="WD20240101001"
)
if withdraw.result:
print(f"提现状态: {withdraw.result.withdraw_status.name}")
if withdraw.result.is_success:
print(f"到账金额: {withdraw.result.actual_yuan}元")
elif withdraw.result.reject_reason:
print(f"拒绝原因: {withdraw.result.reject_reason}")
get_daily_bill(access_token: str, bill_date: str, bill_type: Optional[str] = None, expire_date: Optional[int] = None, uid: Optional[int] = None) -> FundsDailyBillResponse
async
获取日账单。
OpenAPI: open.funds.center.get.daily.bill (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterGetDailyBillRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterGetDailyBillRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
bill_date
|
str
|
账单日期,格式与平台一致(例如 |
必需 |
bill_type
|
Optional[str]
|
账单类型。 |
None
|
expire_date
|
Optional[int]
|
过期日期(毫秒时间戳),可选。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsDailyBillResponse |
FundsDailyBillResponse
|
日账单下载信息。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_bill_batch_detail(access_token: str, cursor: Optional[str] = None, settlement_start_time: Optional[int] = None, settlement_end_time: Optional[int] = None, uid: Optional[int] = None) -> FundsBillBatchDetailResponse
async
批量账单详情。
OpenAPI: open.funds.financial.bill.batch.detail (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialBillBatchDetailRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialBillBatchDetailRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
settlement_start_time
|
Optional[int]
|
结算开始时间(毫秒时间戳)。 |
None
|
settlement_end_time
|
Optional[int]
|
结算结束时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsBillBatchDetailResponse |
FundsBillBatchDetailResponse
|
批量账单详情响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_post_sales_bill_list(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, uid: Optional[int] = None) -> FundsPostSalesBillListResponse
async
售后账单列表。
OpenAPI: open.funds.financial.bill.post.sales.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialBillPostSalesListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialBillPostSalesListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsPostSalesBillListResponse |
FundsPostSalesBillListResponse
|
售后账单列表响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
query_financial_bill_list(access_token: str, end_time: Optional[int] = None, scroll_id: Optional[str] = None, order_status: Optional[int] = None, start_time: Optional[int] = None, bill_type: Optional[str] = None, account_channel: Optional[List[str]] = None, uid: Optional[int] = None) -> FundsFinancialQueryBillListResponse
async
资金财务账单列表。
OpenAPI: open.funds.financial.query.bill.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialQueryBillListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialQueryBillListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
scroll_id
|
Optional[str]
|
滚动游标 ID,用于游标翻页。 |
None
|
order_status
|
Optional[int]
|
订单状态。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
bill_type
|
Optional[str]
|
账单类型。 |
None
|
account_channel
|
Optional[List[str]]
|
出入账渠道列表。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsFinancialQueryBillListResponse |
FundsFinancialQueryBillListResponse
|
财务账单列表数据。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
query_account_bills(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, role_type: Optional[str] = None, biz_type: Optional[list] = None, wallet_type: Optional[str] = None, sub_mch_id: Optional[str] = None, uid: Optional[int] = None) -> FundsQueryAccountBillResponse
async
查询账户账单。
OpenAPI: open.funds.financial.bill.query.account (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialBillQueryAccountRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialBillQueryAccountRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
role_type
|
Optional[str]
|
角色类型。 |
None
|
biz_type
|
Optional[list]
|
业务类型列表。 |
None
|
wallet_type
|
Optional[str]
|
钱包类型。 |
None
|
sub_mch_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsQueryAccountBillResponse |
FundsQueryAccountBillResponse
|
查询账户账单响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_settled_bill_detail(access_token: str, cursor: Optional[str] = None, settlement_start_time: Optional[int] = None, settlement_end_time: Optional[int] = None, order_id: Optional[int] = None, size: Optional[int] = None, order_complete_start_time: Optional[int] = None, order_complete_end_time: Optional[int] = None, uid: Optional[int] = None) -> FundsSettledBillDetailResponse
async
结算账单详情。
OpenAPI: open.funds.financial.settled.bill.detail (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialSettledBillDetailRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialSettledBillDetailRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
settlement_start_time
|
Optional[int]
|
结算开始时间(毫秒时间戳)。 |
None
|
settlement_end_time
|
Optional[int]
|
结算结束时间(毫秒时间戳)。 |
None
|
order_id
|
Optional[int]
|
订单 ID。 |
None
|
size
|
Optional[int]
|
分页大小。 |
None
|
order_complete_start_time
|
Optional[int]
|
订单完成开始时间(毫秒时间戳)。 |
None
|
order_complete_end_time
|
Optional[int]
|
订单完成结束时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsSettledBillDetailResponse |
FundsSettledBillDetailResponse
|
结算账单详情响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_freight_insurance_list(access_token: str, cursor: Optional[str] = None, start_complete_time: Optional[int] = None, end_complete_time: Optional[int] = None, uid: Optional[int] = None) -> FundsFreightInsuranceListResponse
async
运费险列表。
OpenAPI: open.funds.financial.freight.insurance.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialFreightInsuranceListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialFreightInsuranceListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_complete_time
|
Optional[int]
|
开始完成时间(毫秒时间戳)。 |
None
|
end_complete_time
|
Optional[int]
|
结束完成时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsFreightInsuranceListResponse |
FundsFreightInsuranceListResponse
|
运费险列表响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_pingan_bill(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, biz_type: Optional[list] = None, sub_mch_id: Optional[str] = None, uid: Optional[int] = None) -> FundsPinganBillResponse
async
平安账单。
OpenAPI: open.funds.financial.pingan.bill (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialPinganBillRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialPinganBillRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
biz_type
|
Optional[list]
|
业务类型列表。 |
None
|
sub_mch_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsPinganBillResponse |
FundsPinganBillResponse
|
平安账单响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_statement_list(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, sub_mch_id: Optional[str] = None, uid: Optional[int] = None) -> FundsStatementListResponse
async
对账单列表。
OpenAPI: open.funds.financial.statement.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialStatementListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialStatementListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
sub_mch_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsStatementListResponse |
FundsStatementListResponse
|
对账单列表响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
apply_invoice(access_token: str, amount: int, relate_order_no: str, invoice_type: int, invoice_open_kind: int, electron_invoice_info_list: Optional[List[dict]] = None, tax_rate: Optional[str] = None, token: Optional[str] = None, uid: Optional[int] = None) -> FundsApplyInvoiceResponse
async
申请发票(非文件接口)。
OpenAPI: open.funds.subsidy.open.apply.invoice (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsSubsidyOpenApplyInvoiceRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsSubsidyOpenApplyInvoiceRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
amount
|
int
|
发票金额(分)。 |
必需 |
relate_order_no
|
str
|
关联订单号。 |
必需 |
invoice_type
|
int
|
发票类型。 |
必需 |
invoice_open_kind
|
int
|
发票开具类型。 |
必需 |
electron_invoice_info_list
|
Optional[List[dict]]
|
电子发票明细列表。 |
None
|
tax_rate
|
Optional[str]
|
税率。 |
None
|
token
|
Optional[str]
|
防重放 token,可选。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsApplyInvoiceResponse |
FundsApplyInvoiceResponse
|
申请结果。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
audit_invoice_info(access_token: str, oid: str, uid: Optional[int] = None) -> FundsAuditInvoiceInfoResponse
async
审核发票信息。
OpenAPI: open.funds.subsidy.audit.invoice.info (POST)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsSubsidyAuditInvoiceInfoRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsSubsidyAuditInvoiceInfoRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
oid
|
str
|
订单 ID。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsAuditInvoiceInfoResponse |
FundsAuditInvoiceInfoResponse
|
审核发票信息响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
apply_invoice_file(access_token: str, relate_order_no: str, invoice_open_kind: int, tax_rate: str, cert_no: str, invoice_name: str, invoice_open_date: int, count: int, goods: str, invoice_code: str, invoice_verify_code: str, invoice_tax: str, tax_authority_code: str, invoice_location_code: str, exclude_tax_amount: str, isv_code: str, invoice_no: str, uid: Optional[int] = None) -> FundsApplyInvoiceFileResponse
async
申请发票文件。
OpenAPI: open.funds.subsidy.open.apply.invoice.file (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsSubsidyOpenApplyInvoiceFileRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsSubsidyOpenApplyInvoiceFileRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
relate_order_no
|
str
|
关联订单号。 |
必需 |
invoice_open_kind
|
int
|
发票开具类型。 |
必需 |
tax_rate
|
str
|
税率。 |
必需 |
cert_no
|
str
|
证书号。 |
必需 |
invoice_name
|
str
|
发票名称。 |
必需 |
invoice_open_date
|
int
|
发票开具日期(毫秒时间戳)。 |
必需 |
count
|
int
|
数量。 |
必需 |
goods
|
str
|
商品。 |
必需 |
invoice_code
|
str
|
发票代码。 |
必需 |
invoice_verify_code
|
str
|
发票验证码。 |
必需 |
invoice_tax
|
str
|
发票税额。 |
必需 |
tax_authority_code
|
str
|
税务机关代码。 |
必需 |
invoice_location_code
|
str
|
发票所在地代码。 |
必需 |
exclude_tax_amount
|
str
|
不含税金额。 |
必需 |
isv_code
|
str
|
ISV 代码。 |
必需 |
invoice_no
|
str
|
发票号码。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsApplyInvoiceFileResponse |
FundsApplyInvoiceFileResponse
|
申请发票文件响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
同步资金服务
kwaixiaodian.client.services.funds.SyncFundsService(client: SyncBaseClient)
同步资金管理服务
提供账户资金查询、资金流水记录、提现管理、结算查询等功能的同步版本。 支持完整的资金生命周期管理和财务对账功能。
初始化资金管理服务
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
client
|
SyncBaseClient
|
同步基础客户端实例 |
必需 |
方法:
| 名称 | 描述 |
|---|---|
get_account_info |
获取账户资金信息。 |
apply_withdraw |
申请提现。 |
list_withdraw_records |
获取提现记录。 |
query_withdraw |
查询提现状态。 |
get_daily_bill |
获取日账单。 |
get_bill_batch_detail |
批量账单详情。 |
get_post_sales_bill_list |
售后账单列表。 |
query_financial_bill_list |
资金财务账单列表。 |
query_account_bills |
查询账户账单。 |
get_settled_bill_detail |
结算账单详情。 |
get_freight_insurance_list |
运费险列表。 |
get_pingan_bill |
平安账单。 |
get_statement_list |
对账单列表。 |
apply_invoice |
申请发票(非文件接口)。 |
audit_invoice_info |
审核发票信息。 |
apply_invoice_file |
申请发票文件。 |
Functions
get_account_info(access_token: str, uid: Optional[int] = None) -> FundsAccountInfoResponse
获取账户资金信息。
OpenAPI: open.funds.center.account.info (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterAccountInfoRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterAccountInfoRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsAccountInfoResponse |
FundsAccountInfoResponse
|
账户资金信息响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
apply_withdraw(access_token: str, withdraw_money: int, withdraw_no: Optional[str] = None, remark: Optional[str] = None, account_channel: Optional[int] = None, sub_merchant_id: Optional[str] = None, uid: Optional[int] = None) -> FundsWithdrawApplyResponse
申请提现。
OpenAPI: open.funds.center.withdraw.apply (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterWithdrawApplyRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterWithdrawApplyRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
withdraw_money
|
int
|
提现金额(分)。 |
必需 |
withdraw_no
|
Optional[str]
|
提现单号,可选。 |
None
|
remark
|
Optional[str]
|
备注信息,可选。 |
None
|
account_channel
|
Optional[int]
|
出账通道,可选。 |
None
|
sub_merchant_id
|
Optional[str]
|
子商户 ID,可选。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsWithdrawApplyResponse |
FundsWithdrawApplyResponse
|
申请提现响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
list_withdraw_records(access_token: str, limit: Optional[int] = None, page: Optional[int] = None, create_time_start: Optional[int] = None, create_time_end: Optional[int] = None, account_channel: Optional[int] = None, sub_merchant_id: Optional[str] = None, uid: Optional[int] = None) -> FundsWithdrawRecordResponse
获取提现记录。
OpenAPI: open.funds.center.wirhdraw.record.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterWirhdrawRecordListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterWirhdrawRecordListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
limit
|
Optional[int]
|
每页大小。 |
None
|
page
|
Optional[int]
|
页码。 |
None
|
create_time_start
|
Optional[int]
|
开始时间(时间戳)。 |
None
|
create_time_end
|
Optional[int]
|
结束时间(时间戳)。 |
None
|
account_channel
|
Optional[int]
|
出账通道。 |
None
|
sub_merchant_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsWithdrawRecordResponse |
FundsWithdrawRecordResponse
|
提现记录响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
Example
records = funds_service.list_withdraw_records(
access_token="your_token",
withdraw_status=WithdrawStatus.SUCCESS,
page_size=30
)
if records.result and records.result.items:
for record in records.result.items:
print(f"提现单号: {record.withdraw_no}")
print(f"提现金额: {record.withdraw_yuan}元")
print(f"实际到账: {record.actual_yuan}元")
print(f"状态: {record.withdraw_status.name}")
query_withdraw(access_token: str, withdraw_no: str, uid: Optional[int] = None) -> FundsWithdrawQueryResponse
查询提现状态。
OpenAPI: open.funds.center.get.withdraw.result (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterGetWithdrawResultRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterGetWithdrawResultRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
withdraw_no
|
str
|
提现单号。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsWithdrawQueryResponse |
FundsWithdrawQueryResponse
|
提现状态查询响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
Example
withdraw = funds_service.query_withdraw(
access_token="your_token",
withdraw_no="WD20240101001"
)
if withdraw.result:
print(f"提现状态: {withdraw.result.withdraw_status.name}")
if withdraw.result.is_success:
print(f"到账金额: {withdraw.result.actual_yuan}元")
elif withdraw.result.reject_reason:
print(f"拒绝原因: {withdraw.result.reject_reason}")
get_daily_bill(access_token: str, bill_date: str, bill_type: Optional[str] = None, expire_date: Optional[int] = None, uid: Optional[int] = None) -> FundsDailyBillResponse
获取日账单。
OpenAPI: open.funds.center.get.daily.bill (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsCenterGetDailyBillRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsCenterGetDailyBillRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
bill_date
|
str
|
账单日期,格式与平台一致(例如 |
必需 |
bill_type
|
Optional[str]
|
账单类型。 |
None
|
expire_date
|
Optional[int]
|
过期日期(毫秒时间戳),可选。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsDailyBillResponse |
FundsDailyBillResponse
|
日账单响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_bill_batch_detail(access_token: str, cursor: Optional[str] = None, settlement_start_time: Optional[int] = None, settlement_end_time: Optional[int] = None, uid: Optional[int] = None) -> FundsBillBatchDetailResponse
批量账单详情。
OpenAPI: open.funds.financial.bill.batch.detail (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialBillBatchDetailRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialBillBatchDetailRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
settlement_start_time
|
Optional[int]
|
结算开始时间(毫秒时间戳)。 |
None
|
settlement_end_time
|
Optional[int]
|
结算结束时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsBillBatchDetailResponse |
FundsBillBatchDetailResponse
|
批量账单详情响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_post_sales_bill_list(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, uid: Optional[int] = None) -> FundsPostSalesBillListResponse
售后账单列表。
OpenAPI: open.funds.financial.bill.post.sales.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialBillPostSalesListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialBillPostSalesListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsPostSalesBillListResponse |
FundsPostSalesBillListResponse
|
售后账单列表响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
query_financial_bill_list(access_token: str, end_time: Optional[int] = None, scroll_id: Optional[str] = None, order_status: Optional[int] = None, start_time: Optional[int] = None, bill_type: Optional[str] = None, account_channel: Optional[List[str]] = None, uid: Optional[int] = None) -> FundsFinancialQueryBillListResponse
资金财务账单列表。
OpenAPI: open.funds.financial.query.bill.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialQueryBillListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialQueryBillListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
scroll_id
|
Optional[str]
|
滚动游标 ID,用于游标翻页。 |
None
|
order_status
|
Optional[int]
|
订单状态。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
bill_type
|
Optional[str]
|
账单类型。 |
None
|
account_channel
|
Optional[List[str]]
|
出入账渠道列表。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsFinancialQueryBillListResponse |
FundsFinancialQueryBillListResponse
|
财务账单列表数据。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
query_account_bills(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, role_type: Optional[str] = None, biz_type: Optional[list] = None, wallet_type: Optional[str] = None, sub_mch_id: Optional[str] = None, uid: Optional[int] = None) -> FundsQueryAccountBillResponse
查询账户账单。
OpenAPI: open.funds.financial.bill.query.account (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialBillQueryAccountRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialBillQueryAccountRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
role_type
|
Optional[str]
|
角色类型。 |
None
|
biz_type
|
Optional[list]
|
业务类型列表。 |
None
|
wallet_type
|
Optional[str]
|
钱包类型。 |
None
|
sub_mch_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsQueryAccountBillResponse |
FundsQueryAccountBillResponse
|
查询账户账单响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_settled_bill_detail(access_token: str, cursor: Optional[str] = None, settlement_start_time: Optional[int] = None, settlement_end_time: Optional[int] = None, order_id: Optional[int] = None, size: Optional[int] = None, order_complete_start_time: Optional[int] = None, order_complete_end_time: Optional[int] = None, uid: Optional[int] = None) -> FundsSettledBillDetailResponse
结算账单详情。
OpenAPI: open.funds.financial.settled.bill.detail (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialSettledBillDetailRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialSettledBillDetailRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
settlement_start_time
|
Optional[int]
|
结算开始时间(毫秒时间戳)。 |
None
|
settlement_end_time
|
Optional[int]
|
结算结束时间(毫秒时间戳)。 |
None
|
order_id
|
Optional[int]
|
订单 ID。 |
None
|
size
|
Optional[int]
|
分页大小。 |
None
|
order_complete_start_time
|
Optional[int]
|
订单完成开始时间(毫秒时间戳)。 |
None
|
order_complete_end_time
|
Optional[int]
|
订单完成结束时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsSettledBillDetailResponse |
FundsSettledBillDetailResponse
|
结算账单详情响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_freight_insurance_list(access_token: str, cursor: Optional[str] = None, start_complete_time: Optional[int] = None, end_complete_time: Optional[int] = None, uid: Optional[int] = None) -> FundsFreightInsuranceListResponse
运费险列表。
OpenAPI: open.funds.financial.freight.insurance.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialFreightInsuranceListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialFreightInsuranceListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_complete_time
|
Optional[int]
|
开始完成时间(毫秒时间戳)。 |
None
|
end_complete_time
|
Optional[int]
|
结束完成时间(毫秒时间戳)。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsFreightInsuranceListResponse |
FundsFreightInsuranceListResponse
|
运费险列表响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_pingan_bill(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, biz_type: Optional[list] = None, sub_mch_id: Optional[str] = None, uid: Optional[int] = None) -> FundsPinganBillResponse
平安账单。
OpenAPI: open.funds.financial.pingan.bill (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialPinganBillRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialPinganBillRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
biz_type
|
Optional[list]
|
业务类型列表。 |
None
|
sub_mch_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsPinganBillResponse |
FundsPinganBillResponse
|
平安账单响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
get_statement_list(access_token: str, cursor: Optional[str] = None, start_time: Optional[int] = None, end_time: Optional[int] = None, sub_mch_id: Optional[str] = None, uid: Optional[int] = None) -> FundsStatementListResponse
对账单列表。
OpenAPI: open.funds.financial.statement.list (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsFinancialStatementListRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsFinancialStatementListRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
cursor
|
Optional[str]
|
游标,用于分页。 |
None
|
start_time
|
Optional[int]
|
开始时间(毫秒时间戳)。 |
None
|
end_time
|
Optional[int]
|
结束时间(毫秒时间戳)。 |
None
|
sub_mch_id
|
Optional[str]
|
子商户 ID。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsStatementListResponse |
FundsStatementListResponse
|
对账单列表响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
apply_invoice(access_token: str, amount: int, relate_order_no: str, invoice_type: int, invoice_open_kind: int, electron_invoice_info_list: Optional[List[dict]] = None, tax_rate: Optional[str] = None, token: Optional[str] = None, uid: Optional[int] = None) -> FundsApplyInvoiceResponse
申请发票(非文件接口)。
OpenAPI: open.funds.subsidy.open.apply.invoice (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsSubsidyOpenApplyInvoiceRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsSubsidyOpenApplyInvoiceRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
amount
|
int
|
发票金额(分)。 |
必需 |
relate_order_no
|
str
|
关联订单号。 |
必需 |
invoice_type
|
int
|
发票类型。 |
必需 |
invoice_open_kind
|
int
|
发票开具类型。 |
必需 |
electron_invoice_info_list
|
Optional[List[dict]]
|
电子发票明细列表。 |
None
|
tax_rate
|
Optional[str]
|
税率。 |
None
|
token
|
Optional[str]
|
防重放 token,可选。 |
None
|
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsApplyInvoiceResponse |
FundsApplyInvoiceResponse
|
申请结果。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
audit_invoice_info(access_token: str, oid: str, uid: Optional[int] = None) -> FundsAuditInvoiceInfoResponse
审核发票信息。
OpenAPI: open.funds.subsidy.audit.invoice.info (POST)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsSubsidyAuditInvoiceInfoRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsSubsidyAuditInvoiceInfoRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
oid
|
str
|
订单 ID。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsAuditInvoiceInfoResponse |
FundsAuditInvoiceInfoResponse
|
审核发票信息响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
apply_invoice_file(access_token: str, relate_order_no: str, invoice_open_kind: int, tax_rate: str, cert_no: str, invoice_name: str, invoice_open_date: int, count: int, goods: str, invoice_code: str, invoice_verify_code: str, invoice_tax: str, tax_authority_code: str, invoice_location_code: str, exclude_tax_amount: str, isv_code: str, invoice_no: str, uid: Optional[int] = None) -> FundsApplyInvoiceFileResponse
申请发票文件。
OpenAPI: open.funds.subsidy.open.apply.invoice.file (GET)
Java:
com.kuaishou.merchant.open.api.request.funds
OpenFundsSubsidyOpenApplyInvoiceFileRequest
Java Source:
java_sdk_reference/decompiled_source/com/kuaishou/merchant/open/
api/request/funds/OpenFundsSubsidyOpenApplyInvoiceFileRequest.java
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
access_token
|
str
|
访问令牌。 |
必需 |
relate_order_no
|
str
|
关联订单号。 |
必需 |
invoice_open_kind
|
int
|
发票开具类型。 |
必需 |
tax_rate
|
str
|
税率。 |
必需 |
cert_no
|
str
|
证书号。 |
必需 |
invoice_name
|
str
|
发票名称。 |
必需 |
invoice_open_date
|
int
|
发票开具日期(毫秒时间戳)。 |
必需 |
count
|
int
|
数量。 |
必需 |
goods
|
str
|
商品。 |
必需 |
invoice_code
|
str
|
发票代码。 |
必需 |
invoice_verify_code
|
str
|
发票验证码。 |
必需 |
invoice_tax
|
str
|
发票税额。 |
必需 |
tax_authority_code
|
str
|
税务机关代码。 |
必需 |
invoice_location_code
|
str
|
发票所在地代码。 |
必需 |
exclude_tax_amount
|
str
|
不含税金额。 |
必需 |
isv_code
|
str
|
ISV 代码。 |
必需 |
invoice_no
|
str
|
发票号码。 |
必需 |
uid
|
Optional[int]
|
用户 ID,可选;保持作为最后一个可选参数。 |
None
|
返回:
| 名称 | 类型 | 描述 |
|---|---|---|
FundsApplyInvoiceFileResponse |
FundsApplyInvoiceFileResponse
|
申请发票文件响应。 |
引发:
| 类型 | 描述 |
|---|---|
KwaixiaodianValidationError
|
参数缺失或非法。 |
KwaixiaodianAPIError
|
平台返回错误或响应解析失败。 |
资金数据模型
kwaixiaodian.models.funds
资金管理相关数据模型
类:
Classes
FundsBillType
Bases: int, Enum
资金流水类型
WithdrawType
Bases: int, Enum
提现类型
WithdrawStatus
Bases: int, Enum
提现状态
AccountType
Bases: int, Enum
账户类型
FundsTransactionType
Bases: int, Enum
资金交易类型
AccountInfo
Bases: BaseModel
账户资金信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
available_yuan |
float
|
可用余额(元) |
frozen_yuan |
float
|
冻结余额(元) |
total_yuan |
float
|
总余额(元) |
total_income_yuan |
float
|
累计收入(元) |
total_expense_yuan |
float
|
累计支出(元) |
total_withdraw_yuan |
float
|
累计提现(元) |
Attributes
available_yuan: float
property
可用余额(元)
frozen_yuan: float
property
冻结余额(元)
total_yuan: float
property
总余额(元)
total_income_yuan: float
property
累计收入(元)
total_expense_yuan: float
property
累计支出(元)
total_withdraw_yuan: float
property
累计提现(元)
BillRecord
Bases: BaseModel
资金流水记录
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
amount_yuan |
float
|
交易金额(元) |
balance_after_yuan |
float
|
交易后余额(元) |
fee_yuan |
Optional[float]
|
手续费(元) |
is_income |
bool
|
是否为收入 |
is_expense |
bool
|
是否为支出 |
Attributes
amount_yuan: float
property
交易金额(元)
balance_after_yuan: float
property
交易后余额(元)
fee_yuan: Optional[float]
property
手续费(元)
is_income: bool
property
是否为收入
is_expense: bool
property
是否为支出
WithdrawRecord
Bases: BaseModel
提现记录
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
withdraw_yuan |
float
|
提现金额(元) |
actual_yuan |
Optional[float]
|
实际到账金额(元) |
fee_yuan |
Optional[float]
|
手续费(元) |
is_success |
bool
|
是否提现成功 |
is_processing |
bool
|
是否处理中 |
Attributes
withdraw_yuan: float
property
提现金额(元)
actual_yuan: Optional[float]
property
实际到账金额(元)
fee_yuan: Optional[float]
property
手续费(元)
is_success: bool
property
是否提现成功
is_processing: bool
property
是否处理中
SettlementRecord
Bases: BaseModel
结算记录
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
settlement_yuan |
float
|
结算金额(元) |
fee_yuan |
float
|
手续费(元) |
actual_yuan |
float
|
实际金额(元) |
total_order_yuan |
float
|
订单总金额(元) |
total_refund_yuan |
float
|
退款总金额(元) |
Attributes
settlement_yuan: float
property
结算金额(元)
fee_yuan: float
property
手续费(元)
actual_yuan: float
property
实际金额(元)
total_order_yuan: float
property
订单总金额(元)
total_refund_yuan: float
property
退款总金额(元)
FundsStats
Bases: BaseModel
资金统计信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
total_income_yuan |
float
|
总收入(元) |
order_income_yuan |
float
|
订单收入(元) |
other_income_yuan |
float
|
其他收入(元) |
total_expense_yuan |
float
|
总支出(元) |
refund_expense_yuan |
float
|
退款支出(元) |
fee_expense_yuan |
float
|
手续费支出(元) |
withdraw_expense_yuan |
float
|
提现支出(元) |
net_income_yuan |
float
|
净收益(元) |
Attributes
total_income_yuan: float
property
总收入(元)
order_income_yuan: float
property
订单收入(元)
other_income_yuan: float
property
其他收入(元)
total_expense_yuan: float
property
总支出(元)
refund_expense_yuan: float
property
退款支出(元)
fee_expense_yuan: float
property
手续费支出(元)
withdraw_expense_yuan: float
property
提现支出(元)
net_income_yuan: float
property
净收益(元)
FundsAccountInfoRequest
FundsAccountInfoResponse
FundsWithdrawApplyRequest
FundsWithdrawApplyResponse
FundsWithdrawRecordRequest
FundsWithdrawRecordResponse(**data)
FundsWithdrawQueryRequest
FundsWithdrawQueryResponse
FundsBalanceNotification
Bases: BaseModel
余额变动通知
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
amount_yuan |
float
|
变动金额(元) |
balance_before_yuan |
float
|
变动前余额(元) |
balance_after_yuan |
float
|
变动后余额(元) |
Attributes
amount_yuan: float
property
变动金额(元)
balance_before_yuan: float
property
变动前余额(元)
balance_after_yuan: float
property
变动后余额(元)
FundsWithdrawNotification
Bases: BaseModel
提现状态通知
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
withdraw_yuan |
float
|
提现金额(元) |
actual_yuan |
Optional[float]
|
实际到账金额(元) |
fee_yuan |
Optional[float]
|
手续费(元) |
Attributes
withdraw_yuan: float
property
提现金额(元)
actual_yuan: Optional[float]
property
实际到账金额(元)
fee_yuan: Optional[float]
property
手续费(元)
FundsDepositInfoRequest
DepositInfo
Bases: BaseModel
保证金信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
deposit_yuan |
float
|
保证金金额(元) |
available_yuan |
float
|
可用金额(元) |
frozen_yuan |
float
|
冻结金额(元) |
Attributes
deposit_yuan: float
property
保证金金额(元)
available_yuan: float
property
可用金额(元)
frozen_yuan: float
property
冻结金额(元)
FundsDepositInfoResponse
FundsDepositRecordRequest
DepositRecord
Bases: BaseModel
保证金记录
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
amount_yuan |
float
|
金额(元) |
balance_yuan |
float
|
余额(元) |
Attributes
amount_yuan: float
property
金额(元)
balance_yuan: float
property
余额(元)
FundsDepositRecordResponse(**data)
FundsDailyBillRequest
DailyBillInfo
Bases: BaseModel
日账单信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
total_yuan |
float
|
总金额(元) |
Attributes
total_yuan: float
property
总金额(元)
FundsDailyBillResponse
FundsBillBatchDetailRequest
BatchBillDetail
Bases: BaseModel
批量账单详情
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
amount_yuan |
float
|
金额(元) |
Attributes
amount_yuan: float
property
金额(元)
FundsBillBatchDetailResponse
FundsPostSalesBillListRequest
PostSalesBillInfo
Bases: BaseModel
售后账单信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
amount_yuan |
float
|
金额(元) |
Attributes
amount_yuan: float
property
金额(元)
FundsPostSalesBillListResponse
FundsQueryAccountBillRequest
AccountBillInfo
Bases: BaseModel
账户账单信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
amount_yuan |
float
|
金额(元) |
balance_yuan |
float
|
余额(元) |
Attributes
amount_yuan: float
property
金额(元)
balance_yuan: float
property
余额(元)
FundsQueryAccountBillResponse
FundsSettledBillDetailRequest
GeneralRefundInfo
GeneralOrderBillDetail
Bases: BaseModel
订单账单详情(Java: GeneralOrderBillDetail)
仅映射代表性字段,完全对齐 Java 字段命名(alias)。 金额类部分字段在 Java 为字符串,保持字符串以避免精度误差;整型金额字段使用 int。
OrderBillDetailPageData
FundsSettledBillDetailResponse
FundsFreightInsuranceListRequest
FreightInsuranceInfo
Bases: BaseModel
运费险信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
insurance_yuan |
float
|
保险金额(元) |
Attributes
insurance_yuan: float
property
保险金额(元)
FundsFreightInsuranceListResponse
FundsPinganBillRequest
PinganBillInfo
Bases: BaseModel
平安账单信息
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
amount_yuan |
float
|
金额(元) |
Attributes
amount_yuan: float
property
金额(元)