diff --git a/docs/WechatTenpayBusiness/Basic_ModelDefinition.md b/docs/WechatTenpayBusiness/Basic_ModelDefinition.md
index ec9a5f9a..46f3669d 100644
--- a/docs/WechatTenpayBusiness/Basic_ModelDefinition.md
+++ b/docs/WechatTenpayBusiness/Basic_ModelDefinition.md
@@ -104,6 +104,26 @@
- 支付关单:`ClosePayment`
+- 智能分账:
+
+ - 分账接收方账户查询:`QueryProfitAllocationReceiverAccounts`
+
+ - 添加分账接收方账户申请:`CreateProfitAllocationReceiverAccountApplication`
+
+ - 查询添加分账接收方账户申请结果(内单号):`GetProfitAllocationReceiverAccountApplicationByApplicationId`
+
+ - 查询添加分账接收方账户申请结果(外单号):`GetProfitAllocationReceiverAccountApplicationByOutApplicationId`
+
+ - 分账申请:`CreateProfitAllocation`
+
+ - 解冻剩余资金:`SetProfitAllocationFinished`
+
+ - 分账查询(内单号):`GetProfitAllocationAmountByPaymentId`
+
+ - 分账查询(外单号):`GetProfitAllocationAmountByOutPaymentId`
+
+ - 查询订单剩余待分金额:`GetProfitAllocationByOutAllocationId`
+
- 账单下载:
- 获取资金账单下载链接:`GetBill`
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Events/ProfitAllocation/ProfitAllocationEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Events/ProfitAllocation/ProfitAllocationEvent.cs
new file mode 100644
index 00000000..7393ed62
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Events/ProfitAllocation/ProfitAllocationEvent.cs
@@ -0,0 +1,90 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Events
+{
+ ///
+ /// 表示 profit_allocation.finished 通知的数据。
+ ///
+ public class ProfitAllocationEvent : WechatTenpayBusinessEvent
+ {
+ public static class Types
+ {
+ public class EventContent
+ {
+ public static class Types
+ {
+ public class AllocationDetail
+ {
+ ///
+ /// 获取或设置平台分账明细单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_detail_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_detail_id")]
+ public string OutAllocationDetailId { get; set; } = default!;
+
+ ///
+ /// 获取或设置微企付分账明细单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocation_detail_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocation_detail_id")]
+ public string AllocationDetailId { get; set; } = default!;
+
+ ///
+ /// 获取或设置接收方账户 ID。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_acct_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_acct_id")]
+ public string ReceiverAccountId { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账金额(单位:分)。
+ ///
+ [Newtonsoft.Json.JsonProperty("amount")]
+ [System.Text.Json.Serialization.JsonPropertyName("amount")]
+ public int Amount { get; set; }
+
+ ///
+ /// 获取或设置分账结果。
+ ///
+ [Newtonsoft.Json.JsonProperty("result")]
+ [System.Text.Json.Serialization.JsonPropertyName("result")]
+ public string Result { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置微企付支付单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("payment_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("payment_id")]
+ public string PaymentId { get; set; } = default!;
+
+ ///
+ /// 获取或设置平台分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_id")]
+ public string OutAllocationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置微企付分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocation_id")]
+ public string AllocationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账状态。
+ ///
+ [Newtonsoft.Json.JsonProperty("status")]
+ [System.Text.Json.Serialization.JsonPropertyName("status")]
+ public string Status { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账明细列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocations")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocations")]
+ public Types.AllocationDetail[] AllocationDetailList { get; set; } = default!;
+ }
+ }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Extensions/WechatTenpayBusinessClientExecuteProfitAllocationsExtensions.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Extensions/WechatTenpayBusinessClientExecuteProfitAllocationsExtensions.cs
new file mode 100644
index 00000000..8369b0e5
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Extensions/WechatTenpayBusinessClientExecuteProfitAllocationsExtensions.cs
@@ -0,0 +1,201 @@
+using System;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using Flurl.Http;
+
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness
+{
+ public static class WechatTenpayBusinessClientExecuteProfitAllocationsExtensions
+ {
+ ///
+ /// 异步调用 [POST] /mse-pay/profit-allocations 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E5%88%86%E8%B4%A6%E7%94%B3%E8%AF%B7
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteCreateProfitAllocationAsync(this WechatTenpayBusinessClient client, Models.CreateProfitAllocationRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ if (request.EnterpriseId == null)
+ request.EnterpriseId = client.Credentials.EnterpriseId;
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Post, "mse-pay", "profit-allocations");
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [POST] /mse-pay/profit-allocations/finish 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E8%A7%A3%E5%86%BB%E5%89%A9%E4%BD%99%E8%B5%84%E9%87%91
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteSetProfitAllocationFinishedAsync(this WechatTenpayBusinessClient client, Models.SetProfitAllocationFinishedRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ if (request.EnterpriseId == null)
+ request.EnterpriseId = client.Credentials.EnterpriseId;
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Post, "mse-pay", "profit-allocations", "finish");
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [GET] /mse-pay/profit-allocations/{allocation_id} 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E5%88%86%E8%B4%A6%E6%9F%A5%E8%AF%A2-%E5%86%85%E5%8D%95%E5%8F%B7
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteGetProfitAllocationByAllocationIdAsync(this WechatTenpayBusinessClient client, Models.GetProfitAllocationByAllocationIdRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Get, "mse-pay", "profit-allocations", request.AllocationId);
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [GET] /mse-pay/profit-allocations/out-allocation-id/{out_allocation_id} 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E5%88%86%E8%B4%A6%E6%9F%A5%E8%AF%A2-%E5%A4%96%E5%8D%95%E5%8F%B7
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteGetProfitAllocationByOutAllocationIdAsync(this WechatTenpayBusinessClient client, Models.GetProfitAllocationByOutAllocationIdRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Get, "mse-pay", "profit-allocations", "out-allocation-id", request.OutAllocationId);
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [GET] /mse-pay/profit-allocations/{payment_id}/amounts 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E6%9F%A5%E8%AF%A2%E8%AE%A2%E5%8D%95%E5%89%A9%E4%BD%99%E5%BE%85%E5%88%86%E9%87%91%E9%A2%9D
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteGetProfitAllocationAmountByPaymentIdAsync(this WechatTenpayBusinessClient client, Models.GetProfitAllocationAmountByPaymentIdRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Get, "mse-pay", "profit-allocations", request.PaymentId, "amounts");
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ #region ReceiverAccount
+ ///
+ /// 异步调用 [GET] /mse-pay/profit-allocations/receiver-accounts 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E5%88%86%E8%B4%A6%E6%8E%A5%E6%94%B6%E6%96%B9%E8%B4%A6%E6%88%B7%E6%9F%A5%E8%AF%A2
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteQueryProfitAllocationReceiverAccountsAsync(this WechatTenpayBusinessClient client, Models.QueryProfitAllocationReceiverAccountsRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ if (request.EnterpriseId == null)
+ request.EnterpriseId = client.Credentials.EnterpriseId;
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Get, "mse-pay", "profit-allocations", "receiver-accounts")
+ .SetQueryParam("ent_id", request.EnterpriseId);
+
+ if (request.UnifiedSocialCreditCode != null)
+ flurlReq.SetQueryParam("unified_social_credit_code", request.UnifiedSocialCreditCode);
+
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [POST] /mse-pay/profit-allocations/receiver-accounts-applications 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E6%B7%BB%E5%8A%A0%E5%88%86%E8%B4%A6%E6%8E%A5%E6%94%B6%E6%96%B9%E8%B4%A6%E6%88%B7%E7%94%B3%E8%AF%B7
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteCreateProfitAllocationReceiverAccountApplicationAsync(this WechatTenpayBusinessClient client, Models.CreateProfitAllocationReceiverAccountApplicationRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ if (request.EnterpriseId == null)
+ request.EnterpriseId = client.Credentials.EnterpriseId;
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Post, "mse-pay", "profit-allocations", "receiver-accounts-applications");
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [GET] /mse-pay/profit-allocations/receiver-accounts-applications/{application_id} 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E6%9F%A5%E8%AF%A2%E6%B7%BB%E5%8A%A0%E5%88%86%E8%B4%A6%E6%8E%A5%E6%94%B6%E6%96%B9%E8%B4%A6%E6%88%B7%E7%94%B3%E8%AF%B7%E7%BB%93%E6%9E%9C-%E5%86%85%E5%8D%95%E5%8F%B7
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteGetProfitAllocationReceiverAccountApplicationByApplicationIdAsync(this WechatTenpayBusinessClient client, Models.GetProfitAllocationReceiverAccountApplicationByApplicationIdRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Get, "mse-pay", "profit-allocations", "receiver-accounts-applications", request.ApplicationId);
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+
+ ///
+ /// 异步调用 [GET] /mse-pay/profit-allocations/receiver-accounts-applications/out_application_id/{out_application_id} 接口。
+ /// REF: https://businesspay.qq.com/p/doc/mse/api/server.html#%E6%9F%A5%E8%AF%A2%E6%B7%BB%E5%8A%A0%E5%88%86%E8%B4%A6%E6%8E%A5%E6%94%B6%E6%96%B9%E8%B4%A6%E6%88%B7%E7%94%B3%E8%AF%B7%E7%BB%93%E6%9E%9C-%E5%A4%96%E5%8D%95%E5%8F%B7
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static async Task ExecuteGetProfitAllocationReceiverAccountApplicationByOutApplicationIdAsync(this WechatTenpayBusinessClient client, Models.GetProfitAllocationReceiverAccountApplicationByOutApplicationIdRequest request, CancellationToken cancellationToken = default)
+ {
+ if (client is null) throw new ArgumentNullException(nameof(client));
+ if (request is null) throw new ArgumentNullException(nameof(request));
+
+ IFlurlRequest flurlReq = client
+ .CreateRequest(request, HttpMethod.Get, "mse-pay", "profit-allocations", "receiver-accounts-applications", "out_application_id", request.OutApplicationId);
+
+ return await client.SendRequestWithJsonAsync(flurlReq, data: request, cancellationToken: cancellationToken);
+ }
+ #endregion
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/CreateProfitAllocationRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/CreateProfitAllocationRequest.cs
new file mode 100644
index 00000000..f8553dff
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/CreateProfitAllocationRequest.cs
@@ -0,0 +1,107 @@
+using System.Collections.Generic;
+
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [POST] /mse-pay/profit-allocations 接口的请求。
+ ///
+ public class CreateProfitAllocationRequest : WechatTenpayBusinessRequest
+ {
+ public static class Types
+ {
+ public class AllocationDetail
+ {
+ ///
+ /// 获取或设置平台分账明细单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_detail_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_detail_id")]
+ public string OutAllocationDetailId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置接收方账户 ID。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_acct_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_acct_id")]
+ public string ReceiverAccountId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置商户名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_name")]
+ public string MerchantName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置分账金额(单位:分)。
+ ///
+ [Newtonsoft.Json.JsonProperty("amount")]
+ [System.Text.Json.Serialization.JsonPropertyName("amount")]
+ public int Amount { get; set; }
+
+ ///
+ /// 获取或设置分账场景。
+ ///
+ [Newtonsoft.Json.JsonProperty("scenario")]
+ [System.Text.Json.Serialization.JsonPropertyName("scenario")]
+ public string Scene { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置分账场景补充。
+ ///
+ [Newtonsoft.Json.JsonProperty("detail")]
+ [System.Text.Json.Serialization.JsonPropertyName("detail")]
+ public string? Detail { get; set; }
+
+ ///
+ /// 获取或设置分账原因描述。
+ ///
+ [Newtonsoft.Json.JsonProperty("desc")]
+ [System.Text.Json.Serialization.JsonPropertyName("desc")]
+ public string? Description { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置企业商户 ID。如果不指定将使用构造 时的 参数。
+ ///
+ [Newtonsoft.Json.JsonProperty("ent_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("ent_id")]
+ public string? EnterpriseId { get; set; }
+
+ ///
+ /// 获取或设置微企付支付单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("payment_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("payment_id")]
+ public string PaymentId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置平台分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_id")]
+ public string OutAllocationId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置分账结果通知 URL。
+ ///
+ [Newtonsoft.Json.JsonProperty("server_notify_url")]
+ [System.Text.Json.Serialization.JsonPropertyName("server_notify_url")]
+ public string ServerNotifyUrl { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置是否解冻剩余未分资金。
+ ///
+ [Newtonsoft.Json.JsonProperty("finish")]
+ [System.Text.Json.Serialization.JsonPropertyName("finish")]
+ public bool IsFinish { get; set; }
+
+ ///
+ /// 获取或设置分账明细列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocations")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocations")]
+ public IList AllocationDetailList { get; set; } = new List();
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/CreateProfitAllocationResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/CreateProfitAllocationResponse.cs
new file mode 100644
index 00000000..5bd0c77d
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/CreateProfitAllocationResponse.cs
@@ -0,0 +1,9 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [POST] /mse-pay/profit-allocations 接口的响应。
+ ///
+ public class CreateProfitAllocationResponse : GetProfitAllocationByAllocationIdResponse
+ {
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationAmountByPaymentIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationAmountByPaymentIdRequest.cs
new file mode 100644
index 00000000..687364ed
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationAmountByPaymentIdRequest.cs
@@ -0,0 +1,15 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/{payment_id}/amounts 接口的请求。
+ ///
+ public class GetProfitAllocationAmountByPaymentIdRequest : WechatTenpayBusinessRequest
+ {
+ ///
+ /// 获取或设置微企付支付单号。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string PaymentId { get; set; } = string.Empty;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationAmountByPaymentIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationAmountByPaymentIdResponse.cs
new file mode 100644
index 00000000..85cd7032
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationAmountByPaymentIdResponse.cs
@@ -0,0 +1,22 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/{payment_id}/amounts 接口的响应。
+ ///
+ public class GetProfitAllocationAmountByPaymentIdResponse : WechatTenpayBusinessResponse
+ {
+ ///
+ /// 获取或设置微企付支付单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("payment_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("payment_id")]
+ public string PaymentId { get; set; } = default!;
+
+ ///
+ /// 获取或设置订单剩余待分金额(单位:分)。
+ ///
+ [Newtonsoft.Json.JsonProperty("unsplit_amount")]
+ [System.Text.Json.Serialization.JsonPropertyName("unsplit_amount")]
+ public int UnsplitAmount { get; set; }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByAllocationIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByAllocationIdRequest.cs
new file mode 100644
index 00000000..91be49bb
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByAllocationIdRequest.cs
@@ -0,0 +1,15 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/{allocation_id} 接口的请求。
+ ///
+ public class GetProfitAllocationByAllocationIdRequest : WechatTenpayBusinessRequest
+ {
+ ///
+ /// 获取或设置微企付分账单号。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string AllocationId { get; set; } = string.Empty;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByAllocationIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByAllocationIdResponse.cs
new file mode 100644
index 00000000..6e4217dc
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByAllocationIdResponse.cs
@@ -0,0 +1,146 @@
+using System;
+
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/{allocation_id} 接口的响应。
+ ///
+ public class GetProfitAllocationByAllocationIdResponse : WechatTenpayBusinessResponse
+ {
+ public static class Types
+ {
+ public class AllocationDetail
+ {
+ public static class Types
+ {
+ public class Failure : GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse.Types.Failure
+ {
+ }
+ }
+
+ ///
+ /// 获取或设置平台分账明细单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_detail_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_detail_id")]
+ public string OutAllocationDetailId { get; set; } = default!;
+
+ ///
+ /// 获取或设置微企付分账明细单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocation_detail_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocation_detail_id")]
+ public string AllocationDetailId { get; set; } = default!;
+
+ ///
+ /// 获取或设置接收方账户 ID。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_acct_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_acct_id")]
+ public string ReceiverAccountId { get; set; } = default!;
+
+ ///
+ /// 获取或设置商户名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_name")]
+ public string MerchantName { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账金额(单位:分)。
+ ///
+ [Newtonsoft.Json.JsonProperty("amount")]
+ [System.Text.Json.Serialization.JsonPropertyName("amount")]
+ public int Amount { get; set; }
+
+ ///
+ /// 获取或设置分账结果。
+ ///
+ [Newtonsoft.Json.JsonProperty("result")]
+ [System.Text.Json.Serialization.JsonPropertyName("result")]
+ public string Result { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账成功时间。
+ ///
+ [Newtonsoft.Json.JsonProperty("succeeded_time")]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
+ [System.Text.Json.Serialization.JsonPropertyName("succeeded_time")]
+ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
+ public DateTimeOffset? SucceedTime { get; set; }
+
+ ///
+ /// 获取或设置分账原因描述。
+ ///
+ [Newtonsoft.Json.JsonProperty("desc")]
+ [System.Text.Json.Serialization.JsonPropertyName("desc")]
+ public string? Description { get; set; }
+
+ ///
+ /// 获取或设置失败信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("failed_reason")]
+ [System.Text.Json.Serialization.JsonPropertyName("failed_reason")]
+ public Types.Failure? Failure { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置微企付支付单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("payment_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("payment_id")]
+ public string PaymentId { get; set; } = default!;
+
+ ///
+ /// 获取或设置平台分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_id")]
+ public string OutAllocationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置微企付分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocation_id")]
+ public string AllocationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账状态。
+ ///
+ [Newtonsoft.Json.JsonProperty("status")]
+ [System.Text.Json.Serialization.JsonPropertyName("status")]
+ public string Status { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账完成时间。
+ ///
+ [Newtonsoft.Json.JsonProperty("finished_time")]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
+ [System.Text.Json.Serialization.JsonPropertyName("finished_time")]
+ [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
+ public DateTimeOffset? FinishTime { get; set; }
+
+ ///
+ /// 获取或设置分账完成金额(单位:分)。
+ ///
+ [Newtonsoft.Json.JsonProperty("finish_amount")]
+ [System.Text.Json.Serialization.JsonPropertyName("finish_amount")]
+ public int? FinishAmount { get; set; }
+
+ ///
+ /// 获取或设置分账完成描述。
+ ///
+ [Newtonsoft.Json.JsonProperty("finish_desc")]
+ [System.Text.Json.Serialization.JsonPropertyName("finish_desc")]
+ public string? FinishDescription { get; set; }
+
+ ///
+ /// 获取或设置分账明细列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocations")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocations")]
+ public Types.AllocationDetail[] AllocationDetailList { get; set; } = default!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByOutAllocationIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByOutAllocationIdRequest.cs
new file mode 100644
index 00000000..0f67aed9
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByOutAllocationIdRequest.cs
@@ -0,0 +1,15 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/out-allocation-id/{out_allocation_id} 接口的请求。
+ ///
+ public class GetProfitAllocationByOutAllocationIdRequest : WechatTenpayBusinessRequest
+ {
+ ///
+ /// 获取或设置平台分账单号。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string OutAllocationId { get; set; } = string.Empty;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByOutAllocationIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByOutAllocationIdResponse.cs
new file mode 100644
index 00000000..49783d65
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/GetProfitAllocationByOutAllocationIdResponse.cs
@@ -0,0 +1,9 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/out-allocation-id/{out_allocation_id} 接口的响应。
+ ///
+ public class GetProfitAllocationByOutAllocationIdResponse : GetProfitAllocationByAllocationIdResponse
+ {
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationRequest.cs
new file mode 100644
index 00000000..87b8338b
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationRequest.cs
@@ -0,0 +1,244 @@
+using System.Collections.Generic;
+
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [POST] /mse-pay/profit-allocations/receiver-accounts-applications 接口的请求。
+ ///
+ [WechatTenpayBusinessSensitive]
+ public class CreateProfitAllocationReceiverAccountApplicationRequest : WechatTenpayBusinessRequest
+ {
+ public static class Types
+ {
+ public class NaturalPerson
+ {
+ public static class Types
+ {
+ public class Address
+ {
+ ///
+ /// 获取或设置详细地址。
+ ///
+ [Newtonsoft.Json.JsonProperty("detail_address")]
+ [System.Text.Json.Serialization.JsonPropertyName("detail_address")]
+ public string DetailedAddress { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置省份代码。
+ ///
+ [Newtonsoft.Json.JsonProperty("province_code")]
+ [System.Text.Json.Serialization.JsonPropertyName("province_code")]
+ public string ProvinceCode { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置省份名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("province_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("province_name")]
+ public string ProvinceName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置城市名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("city_code")]
+ [System.Text.Json.Serialization.JsonPropertyName("city_code")]
+ public string CityCode { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置城市名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("city_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("city_name")]
+ public string CityName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置区县名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("area_code")]
+ [System.Text.Json.Serialization.JsonPropertyName("area_code")]
+ public string DistrictCode { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置区县名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("area_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("area_name")]
+ public string DistrictName { get; set; } = string.Empty;
+ }
+ }
+
+ ///
+ /// 获取或设置姓名(需使用微企付公钥加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("name")]
+ [System.Text.Json.Serialization.JsonPropertyName("name")]
+ [WechatTenpayBusinessSensitiveProperty]
+ public string Name { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置身份证号(需使用微企付公钥加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("number")]
+ [System.Text.Json.Serialization.JsonPropertyName("number")]
+ [WechatTenpayBusinessSensitiveProperty]
+ public string IdCardNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置身份证期限(格式:["yyyy-MM-dd", "yyyy-MM-dd"],长期用 "长期" 表示)。
+ ///
+ [Newtonsoft.Json.JsonProperty("validity_period")]
+ [System.Text.Json.Serialization.JsonPropertyName("validity_period")]
+ public IList ValidityPeriodStrings { get; set; } = new List();
+
+ ///
+ /// 获取或设置身份证人像面照片 FileId。
+ ///
+ [Newtonsoft.Json.JsonProperty("front_photocopy_file_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("front_photocopy_file_id")]
+ public string FrontPhotoCopyFileId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置身份证国徽面照片 FileId。
+ ///
+ [Newtonsoft.Json.JsonProperty("back_photocopy_file_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("back_photocopy_file_id")]
+ public string BackPhotoCopyFileId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置身份证地址信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("id_card_address_info")]
+ [System.Text.Json.Serialization.JsonPropertyName("id_card_address_info")]
+ public Types.Address Address { get; set; } = new Types.Address();
+ }
+
+ public class SettlementAccount
+ {
+ ///
+ /// 获取或设置账户类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("account_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("account_type")]
+ public string AccountType { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置开户银行。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_name")]
+ public string BankName { get; set; } = default!;
+
+ ///
+ /// 获取或设置开户银行联行号。与字段 二选一。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_branch_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_branch_id")]
+ public string? BankBranchId { get; set; }
+
+ ///
+ /// 获取或设置开户银行全称(含支行)。与字段 二选一。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_branch_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_branch_name")]
+ public string? BankBranchName { get; set; }
+
+ ///
+ /// 获取或设置开户名称(需使用微企付公钥加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_account_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_account_name")]
+ [WechatTenpayBusinessSensitiveProperty]
+ public string BankAccountName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置银行卡号(需使用微企付公钥加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_account_number")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_account_number")]
+ [WechatTenpayBusinessSensitiveProperty]
+ public string BankAccountNumber { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置银行预留手机号(需使用微企付公钥加密)。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_account_mobile")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_account_mobile")]
+ [WechatTenpayBusinessSensitiveProperty]
+ public string? BankAccountMobileNumber { get; set; }
+
+ ///
+ /// 获取或设置银行卡正面照片 FileId。
+ ///
+ [Newtonsoft.Json.JsonProperty("front_photocopy_file_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("front_photocopy_file_id")]
+ public string? FrontPhotoCopyFileId { get; set; }
+ }
+
+ public class WithdrawCycle
+ {
+ ///
+ /// 获取或设置周期类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("cycle_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("cycle_type")]
+ public string CycleType { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置周期值。
+ ///
+ [Newtonsoft.Json.JsonProperty("cycle_value")]
+ [System.Text.Json.Serialization.JsonPropertyName("cycle_value")]
+ public int CycleValue { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置企业商户 ID。如果不指定将使用构造 时的 参数。
+ ///
+ [Newtonsoft.Json.JsonProperty("ent_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("ent_id")]
+ public string? EnterpriseId { get; set; }
+
+ ///
+ /// 获取或设置平台申请单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_application_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_application_id")]
+ public string OutApplicationId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置接收方类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_type")]
+ public string ReceiverType { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置平台接收方名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_receiver_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_receiver_name")]
+ public string OutReceiverName { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置个人经营者信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("natural_person_info")]
+ [System.Text.Json.Serialization.JsonPropertyName("natural_person_info")]
+ public Types.NaturalPerson? NaturalPerson { get; set; }
+
+ ///
+ /// 获取或设置结算账户信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("settlement_account")]
+ [System.Text.Json.Serialization.JsonPropertyName("settlement_account")]
+ public Types.SettlementAccount SettlementAccount { get; set; } = new Types.SettlementAccount();
+
+ ///
+ /// 获取或设置提现周期信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("withdraw_cycle")]
+ [System.Text.Json.Serialization.JsonPropertyName("withdraw_cycle")]
+ public Types.WithdrawCycle WithdrawCycle { get; set; } = new Types.WithdrawCycle();
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationResponse.cs
new file mode 100644
index 00000000..d5fc5847
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationResponse.cs
@@ -0,0 +1,29 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [POST] /mse-pay/profit-allocations/receiver-accounts-applications 接口的响应。
+ ///
+ public class CreateProfitAllocationReceiverAccountApplicationResponse : WechatTenpayBusinessResponse
+ {
+ ///
+ /// 获取或设置平台申请单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_application_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_application_id")]
+ public string OutApplicationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置微企付申请单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("application_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("application_id")]
+ public string ApplicationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置申请状态。
+ ///
+ [Newtonsoft.Json.JsonProperty("status")]
+ [System.Text.Json.Serialization.JsonPropertyName("status")]
+ public string Status { get; set; } = default!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdRequest.cs
new file mode 100644
index 00000000..5cbc475d
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdRequest.cs
@@ -0,0 +1,15 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/receiver-accounts-applications/{application_id} 接口的请求。
+ ///
+ public class GetProfitAllocationReceiverAccountApplicationByApplicationIdRequest : WechatTenpayBusinessRequest
+ {
+ ///
+ /// 获取或设置微企付申请单号。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string ApplicationId { get; set; } = string.Empty;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse.cs
new file mode 100644
index 00000000..bc6f6c0d
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse.cs
@@ -0,0 +1,115 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/receiver-accounts-applications/{application_id} 接口的响应。
+ ///
+ public class GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse : WechatTenpayBusinessResponse
+ {
+ public static class Types
+ {
+ public class Receiver
+ {
+ ///
+ /// 获取或设置接收方账户 ID。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_acct_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_acct_id")]
+ public string? ReceiverAccountId { get; set; }
+
+ ///
+ /// 获取或设置接收方类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_type")]
+ public string ReceiverType { get; set; } = default!;
+
+ ///
+ /// 获取或设置平台接收方名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_receiver_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_receiver_name")]
+ public string OutReceiverName { get; set; } = default!;
+
+ ///
+ /// 获取或设置商户名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_name")]
+ public string MerchantName { get; set; } = default!;
+
+ ///
+ /// 获取或设置个人身份证号掩码。
+ ///
+ [Newtonsoft.Json.JsonProperty("id_card_num_mask")]
+ [System.Text.Json.Serialization.JsonPropertyName("id_card_num_mask")]
+ public string? IdCardNumberMask { get; set; }
+
+ ///
+ /// 获取或设置个人身份证号 MD5 值。
+ ///
+ [Newtonsoft.Json.JsonProperty("id_card_num_md5")]
+ [System.Text.Json.Serialization.JsonPropertyName("id_card_num_md5")]
+ public string? IdCardNumberMd5 { get; set; }
+ }
+
+ public class Failure
+ {
+ ///
+ /// 获取或设置失败类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("failed_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("failed_type")]
+ public string FailedType { get; set; } = default!;
+
+ ///
+ /// 获取或设置失败原因详情。
+ ///
+ [Newtonsoft.Json.JsonProperty("failed_detail")]
+ [System.Text.Json.Serialization.JsonPropertyName("failed_detail")]
+ public string? FailedDetail { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置平台申请单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_application_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_application_id")]
+ public string OutApplicationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置微企付申请单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("application_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("application_id")]
+ public string ApplicationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置申请状态。
+ ///
+ [Newtonsoft.Json.JsonProperty("status")]
+ [System.Text.Json.Serialization.JsonPropertyName("status")]
+ public string Status { get; set; } = default!;
+
+ ///
+ /// 获取或设置企业商户 ID。
+ ///
+ [Newtonsoft.Json.JsonProperty("ent_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("ent_id")]
+ public string EnterpriseId { get; set; } = default!;
+
+ ///
+ /// 获取或设置接收方信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_info")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_info")]
+ public Types.Receiver Receiver { get; set; } = default!;
+
+ ///
+ /// 获取或设置失败信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("failed_reason")]
+ [System.Text.Json.Serialization.JsonPropertyName("failed_reason")]
+ public Types.Failure? Failure { get; set; }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdRequest.cs
new file mode 100644
index 00000000..42eaa0db
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdRequest.cs
@@ -0,0 +1,15 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/receiver-accounts-applications/out_application_id/{out_application_id} 接口的请求。
+ ///
+ public class GetProfitAllocationReceiverAccountApplicationByOutApplicationIdRequest : WechatTenpayBusinessRequest
+ {
+ ///
+ /// 获取或设置平台申请单号。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string OutApplicationId { get; set; } = string.Empty;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdResponse.cs
new file mode 100644
index 00000000..a7033aad
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdResponse.cs
@@ -0,0 +1,9 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/receiver-accounts-applications/out_application_id/{out_application_id} 接口的响应。
+ ///
+ public class GetProfitAllocationReceiverAccountApplicationByOutApplicationIdResponse : GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse
+ {
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsRequest.cs
new file mode 100644
index 00000000..410c3c59
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsRequest.cs
@@ -0,0 +1,22 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/receiver-accounts 接口的请求。
+ ///
+ public class QueryProfitAllocationReceiverAccountsRequest : WechatTenpayBusinessRequest
+ {
+ ///
+ /// 获取或设置企业商户 ID。如果不指定将使用构造 时的 参数。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string? EnterpriseId { get; set; }
+
+ ///
+ /// 获取或设置统一社会信用代码。
+ ///
+ [Newtonsoft.Json.JsonIgnore]
+ [System.Text.Json.Serialization.JsonIgnore]
+ public string? UnifiedSocialCreditCode { get; set; }
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsResponse.cs
new file mode 100644
index 00000000..c02d7cda
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsResponse.cs
@@ -0,0 +1,125 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [GET] /mse-pay/profit-allocations/receiver-accounts 接口的响应。
+ ///
+ public class QueryProfitAllocationReceiverAccountsResponse : WechatTenpayBusinessResponse
+ {
+ public static class Types
+ {
+ public class ReceiverAccount
+ {
+ public static class Types
+ {
+ public class WithdrawCycle
+ {
+ ///
+ /// 获取或设置周期类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("cycle_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("cycle_type")]
+ public string CycleType { get; set; } = default!;
+
+ ///
+ /// 获取或设置周期值。
+ ///
+ [Newtonsoft.Json.JsonProperty("cycle_value")]
+ [System.Text.Json.Serialization.JsonPropertyName("cycle_value")]
+ public int CycleValue { get; set; }
+ }
+ }
+
+ ///
+ /// 获取或设置接收方账户 ID。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_acct_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_acct_id")]
+ public string ReceiverAccountId { get; set; } = default!;
+
+ ///
+ /// 获取或设置接收方类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_type")]
+ public string ReceiverType { get; set; } = default!;
+
+ ///
+ /// 获取或设置商户名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("merchant_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("merchant_name")]
+ public string MerchantName { get; set; } = default!;
+
+ ///
+ /// 获取或设置统一社会信用代码。
+ ///
+ [Newtonsoft.Json.JsonProperty("unified_social_credit_code")]
+ [System.Text.Json.Serialization.JsonPropertyName("unified_social_credit_code")]
+ public string? UnifiedSocialCreditCode { get; set; }
+
+ ///
+ /// 获取或设置个人身份证号掩码。
+ ///
+ [Newtonsoft.Json.JsonProperty("id_card_num_mask")]
+ [System.Text.Json.Serialization.JsonPropertyName("id_card_num_mask")]
+ public string? IdCardNumberMask { get; set; }
+
+ ///
+ /// 获取或设置个人身份证号 MD5 值。
+ ///
+ [Newtonsoft.Json.JsonProperty("id_card_num_md5")]
+ [System.Text.Json.Serialization.JsonPropertyName("id_card_num_md5")]
+ public string? IdCardNumberMd5 { get; set; }
+
+ ///
+ /// 获取或设置开户银行。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_name")]
+ public string BankName { get; set; } = default!;
+
+ ///
+ /// 获取或设置账户类型。
+ ///
+ [Newtonsoft.Json.JsonProperty("account_type")]
+ [System.Text.Json.Serialization.JsonPropertyName("account_type")]
+ public string AccountType { get; set; } = default!;
+
+ ///
+ /// 获取或设置开户名称。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_account_name")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_account_name")]
+ public string BankAccountName { get; set; } = default!;
+
+ ///
+ /// 获取或设置银行卡号后 4 位。
+ ///
+ [Newtonsoft.Json.JsonProperty("bank_account_number_last4")]
+ [System.Text.Json.Serialization.JsonPropertyName("bank_account_number_last4")]
+ public string BankAccountNumberLast4String { get; set; } = default!;
+
+ ///
+ /// 获取或设置分账方提现周期信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("withdraw_cycle")]
+ [System.Text.Json.Serialization.JsonPropertyName("withdraw_cycle")]
+ public Types.WithdrawCycle WithdrawCycle { get; set; } = default!;
+
+ ///
+ /// 获取或设置接收方提现周期信息。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_withdraw_cycle")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_withdraw_cycle")]
+ public Types.WithdrawCycle ReceiverWithdrawCycle { get; set; } = default!;
+ }
+ }
+
+ ///
+ /// 获取或设置分账接收方账户列表。
+ ///
+ [Newtonsoft.Json.JsonProperty("receiver_accts")]
+ [System.Text.Json.Serialization.JsonPropertyName("receiver_accts")]
+ public Types.ReceiverAccount[] ReceiverAccountList { get; set; } = default!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/SetProfitAllocationFinishedRequest.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/SetProfitAllocationFinishedRequest.cs
new file mode 100644
index 00000000..c537b098
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/SetProfitAllocationFinishedRequest.cs
@@ -0,0 +1,43 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [POST] /mse-pay/profit-allocations/finish 接口的请求。
+ ///
+ public class SetProfitAllocationFinishedRequest : WechatTenpayBusinessRequest
+ {
+ ///
+ /// 获取或设置企业商户 ID。如果不指定将使用构造 时的 参数。
+ ///
+ [Newtonsoft.Json.JsonProperty("ent_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("ent_id")]
+ public string? EnterpriseId { get; set; }
+
+ ///
+ /// 获取或设置微企付支付单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("payment_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("payment_id")]
+ public string PaymentId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置平台分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_id")]
+ public string OutAllocationId { get; set; } = string.Empty;
+
+ ///
+ /// 获取或设置分账原因描述。
+ ///
+ [Newtonsoft.Json.JsonProperty("desc")]
+ [System.Text.Json.Serialization.JsonPropertyName("desc")]
+ public string? Description { get; set; }
+
+ ///
+ /// 获取或设置分账状态通知 URL。
+ ///
+ [Newtonsoft.Json.JsonProperty("server_notify_url")]
+ [System.Text.Json.Serialization.JsonPropertyName("server_notify_url")]
+ public string ServerNotifyUrl { get; set; } = string.Empty;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/SetProfitAllocationFinishedResponse.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/SetProfitAllocationFinishedResponse.cs
new file mode 100644
index 00000000..24d3b496
--- /dev/null
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Models/ProfitAllocations/SetProfitAllocationFinishedResponse.cs
@@ -0,0 +1,29 @@
+namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Models
+{
+ ///
+ /// 表示 [POST] /mse-pay/profit-allocations/finish 接口的响应。
+ ///
+ public class SetProfitAllocationFinishedResponse : WechatTenpayBusinessResponse
+ {
+ ///
+ /// 获取或设置微企付支付单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("payment_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("payment_id")]
+ public string PaymentId { get; set; } = default!;
+
+ ///
+ /// 获取或设置平台分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("out_allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("out_allocation_id")]
+ public string OutAllocationId { get; set; } = default!;
+
+ ///
+ /// 获取或设置微企付分账单号。
+ ///
+ [Newtonsoft.Json.JsonProperty("allocation_id")]
+ [System.Text.Json.Serialization.JsonPropertyName("allocation_id")]
+ public string AllocationId { get; set; } = default!;
+ }
+}
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.csproj b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.csproj
index 29696980..b9a6234c 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.csproj
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.csproj
@@ -13,7 +13,7 @@
README.md
MIT
https://github.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat
- Flurl.Http Tencent Tenpay 腾讯商企付 腾讯微企付 商企付 微企付
+ Flurl.Http Tencent Tenpay FiT 腾讯金融科技服务平台 腾讯金融科技 腾讯金融 腾讯商企付 腾讯微企付 商企付 微企付
2.1.0
基于 Flurl.Http 的微企付 API 客户端。
Fu Diwei
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Settings/Credentials.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Settings/Credentials.cs
index eeeca3a4..fa21be14 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Settings/Credentials.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/Settings/Credentials.cs
@@ -22,7 +22,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Settings
///
/// 初始化客户端时 的副本。
///
- public string EnterpriseId { get; }
+ public string? EnterpriseId { get; }
///
/// 初始化客户端时 的副本。
@@ -37,7 +37,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness.Settings
///
/// 初始化客户端时 的副本。
///
- public string? TBEPCertificateSerialNumber { get; }
+ public string TBEPCertificateSerialNumber { get; }
///
/// 初始化客户端时 的副本。
diff --git a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/WechatTenpayBusinessClientOptions.cs b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/WechatTenpayBusinessClientOptions.cs
index c5aa1aa8..80b88c20 100644
--- a/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/WechatTenpayBusinessClientOptions.cs
+++ b/src/SKIT.FlurlHttpClient.Wechat.TenpayBusiness/WechatTenpayBusinessClientOptions.cs
@@ -41,7 +41,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness
///
/// 获取或设置微企付企业商户 ID。
///
- public string EnterpriseId { get; set; } = default!;
+ public string? EnterpriseId { get; set; }
///
/// 获取或设置微企付企业商户 API 证书序列号。
@@ -56,7 +56,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayBusiness
///
/// 获取或设置微企付 TBEP 证书序列号。
///
- public string? TBEPCertificateSerialNumber { get; set; }
+ public string TBEPCertificateSerialNumber { get; set; } = default!;
///
/// 获取或设置微企付 TBEP 证书公钥。
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/CreateProfitAllocationRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/CreateProfitAllocationRequest.json
new file mode 100644
index 00000000..b2d57cc2
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/CreateProfitAllocationRequest.json
@@ -0,0 +1,18 @@
+{
+ "ent_id": "stringstri",
+ "payment_id": "string",
+ "out_allocation_id": "string",
+ "server_notify_url": "string",
+ "finish": true,
+ "allocations": [
+ {
+ "out_allocation_detail_id": "string",
+ "receiver_acct_id": "string",
+ "merchant_name": "string",
+ "amount": 0,
+ "scenario": "PLATFORM_ALLOCATION",
+ "detail": "string",
+ "desc": "string"
+ }
+ ]
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/CreateProfitAllocationResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/CreateProfitAllocationResponse.json
new file mode 100644
index 00000000..39e3af63
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/CreateProfitAllocationResponse.json
@@ -0,0 +1,23 @@
+{
+ "payment_id": "string",
+ "out_allocation_id": "string",
+ "allocation_id": "string",
+ "status": "INIT",
+ "finished_time": "2019-08-24T14:15:22Z",
+ "allocations": [
+ {
+ "allocation_detail_id": "string",
+ "out_allocation_detail_id": "string",
+ "receiver_acct_id": "string",
+ "merchant_name": "string",
+ "amount": 0,
+ "result": "PENDING",
+ "succeeded_time": "2019-08-24T14:15:22Z",
+ "failed_reason": {
+ "failed_type": "NO_RELATION",
+ "failed_detail": "string"
+ },
+ "desc": "string"
+ }
+ ]
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationAmountByPaymentIdResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationAmountByPaymentIdResponse.json
new file mode 100644
index 00000000..b25dff25
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationAmountByPaymentIdResponse.json
@@ -0,0 +1,4 @@
+{
+ "payment_id": "string",
+ "unsplit_amount": 0
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationByAllocationIdResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationByAllocationIdResponse.json
new file mode 100644
index 00000000..f58d77a9
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationByAllocationIdResponse.json
@@ -0,0 +1,25 @@
+{
+ "payment_id": "string",
+ "out_allocation_id": "string",
+ "allocation_id": "string",
+ "status": "INIT",
+ "finished_time": "2019-08-24T14:15:22Z",
+ "finish_amount": 0,
+ "finish_desc": "string",
+ "allocations": [
+ {
+ "allocation_detail_id": "string",
+ "out_allocation_detail_id": "string",
+ "receiver_acct_id": "string",
+ "merchant_name": "string",
+ "amount": 0,
+ "result": "PENDING",
+ "succeeded_time": "2019-08-24T14:15:22Z",
+ "failed_reason": {
+ "failed_type": "NO_RELATION",
+ "failed_detail": "string"
+ },
+ "desc": "string"
+ }
+ ]
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationByOutAllocationIdResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationByOutAllocationIdResponse.json
new file mode 100644
index 00000000..fd472cc7
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/GetProfitAllocationByOutAllocationIdResponse.json
@@ -0,0 +1,24 @@
+{
+ "payment_id": "string",
+ "out_allocation_id": "string",
+ "allocation_id": "string",
+ "status": "INIT",
+ "finish_amount": 0,
+ "finish_desc": "string",
+ "allocations": [
+ {
+ "allocation_detail_id": "string",
+ "out_allocation_detail_id": "string",
+ "receiver_acct_id": "string",
+ "merchant_name": "string",
+ "amount": 0,
+ "result": "PENDING",
+ "succeeded_time": "2019-08-24T14:15:22Z",
+ "failed_reason": {
+ "failed_type": "NO_RELATION",
+ "failed_detail": "string"
+ },
+ "desc": "string"
+ }
+ ]
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationRequest.json
new file mode 100644
index 00000000..dd74aab7
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationRequest.json
@@ -0,0 +1,35 @@
+{
+ "out_application_id": "string",
+ "ent_id": "stringstri",
+ "receiver_type": "ENTERPRISE",
+ "out_receiver_name": "string",
+ "natural_person_info": {
+ "name": "string",
+ "number": "string",
+ "validity_period": [ "string" ],
+ "front_photocopy_file_id": "string",
+ "back_photocopy_file_id": "string",
+ "id_card_address_info": {
+ "detail_address": "string",
+ "province_name": "string",
+ "province_code": "string",
+ "city_name": "string",
+ "city_code": "string",
+ "area_name": "string",
+ "area_code": "string"
+ }
+ },
+ "settlement_account": {
+ "account_type": "ENTERPRISE_ACCOUNT",
+ "bank_account_name": "string",
+ "bank_account_number": "string",
+ "bank_account_mobile": "string",
+ "bank_branch_id": "string",
+ "bank_branch_name": "string",
+ "bank_name": "string"
+ },
+ "withdraw_cycle": {
+ "cycle_type": "T_N",
+ "cycle_value": 0
+ }
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationResponse.json
new file mode 100644
index 00000000..ff235fe3
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/CreateProfitAllocationReceiverAccountApplicationResponse.json
@@ -0,0 +1,5 @@
+{
+ "out_application_id": "string",
+ "application_id": "string",
+ "status": "PROCESSING"
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse.json
new file mode 100644
index 00000000..5a81fdeb
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByApplicationIdResponse.json
@@ -0,0 +1,18 @@
+{
+ "out_application_id": "string",
+ "application_id": "string",
+ "status": "PROCESSING",
+ "ent_id": "stringstri",
+ "receiver_info": {
+ "receiver_acct_id": "string",
+ "receiver_type": "ENTERPRISE",
+ "merchant_name": "string",
+ "out_receiver_name": "string",
+ "id_card_num_mask": "152***********123*",
+ "id_card_num_md5": "d41d8cd98f00b204e9800998ecf8427e"
+ },
+ "failed_reason": {
+ "failed_type": "BANK_REJECTED",
+ "failed_detail": "string"
+ }
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdResponse.json
new file mode 100644
index 00000000..5a81fdeb
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/GetProfitAllocationReceiverAccountApplicationByOutApplicationIdResponse.json
@@ -0,0 +1,18 @@
+{
+ "out_application_id": "string",
+ "application_id": "string",
+ "status": "PROCESSING",
+ "ent_id": "stringstri",
+ "receiver_info": {
+ "receiver_acct_id": "string",
+ "receiver_type": "ENTERPRISE",
+ "merchant_name": "string",
+ "out_receiver_name": "string",
+ "id_card_num_mask": "152***********123*",
+ "id_card_num_md5": "d41d8cd98f00b204e9800998ecf8427e"
+ },
+ "failed_reason": {
+ "failed_type": "BANK_REJECTED",
+ "failed_detail": "string"
+ }
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsResponse.json
new file mode 100644
index 00000000..42081542
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/ReceiverAccount/QueryProfitAllocationReceiverAccountsResponse.json
@@ -0,0 +1,24 @@
+{
+ "receiver_accts": [
+ {
+ "receiver_acct_id": "6114100203045745560000001234567",
+ "receiver_type": "NATURAL_PERSON",
+ "merchant_name": "个人经营者-张三",
+ "unified_social_credit_code": "9144030071526726XG",
+ "id_card_num_mask": "152***********123*",
+ "id_card_num_md5": "d41d8cd98f00b204e9800998ecf8427e",
+ "bank_name": "平安银行",
+ "account_type": "PERSON_ACCOUNT",
+ "bank_account_name": "张*",
+ "bank_account_number_last4": "1234",
+ "withdraw_cycle": {
+ "cycle_type": "T_N",
+ "cycle_value": 1
+ },
+ "receiver_withdraw_cycle": {
+ "cycle_type": "T_N",
+ "cycle_value": 2
+ }
+ }
+ ]
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/SetProfitAllocationFinishedRequest.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/SetProfitAllocationFinishedRequest.json
new file mode 100644
index 00000000..b2769456
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/SetProfitAllocationFinishedRequest.json
@@ -0,0 +1,7 @@
+{
+ "ent_id": "stringstri",
+ "payment_id": "string",
+ "out_allocation_id": "string",
+ "desc": "string",
+ "server_notify_url": "string"
+}
diff --git a/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/SetProfitAllocationFinishedResponse.json b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/SetProfitAllocationFinishedResponse.json
new file mode 100644
index 00000000..ca04e8c4
--- /dev/null
+++ b/test/SKIT.FlurlHttpClient.Wechat.TenpayBusiness.UnitTests/ModelSamples/ProfitAllocations/SetProfitAllocationFinishedResponse.json
@@ -0,0 +1,5 @@
+{
+ "payment_id": "string",
+ "out_allocation_id": "string",
+ "allocation_id": "string"
+}