You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Stripe.net创建标准关联账户时触发责任配置错误求助

问题:使用Stripe.net创建标准关联账户时触发权限配置错误

我正在使用Stripe.net库搭建面向买卖双方的在线市场,通过以下.NET代码为用户创建标准关联账户:

StripeConfiguration.ApiKey = "xxxx";
var options = new AccountCreateOptions
{
    Country = data.country,
    Email = data.businessEmail,
    Capabilities = new AccountCapabilitiesOptions()
    {
        CardPayments = new AccountCapabilitiesCardPaymentsOptions(){ Requested = true },
        Transfers = new AccountCapabilitiesTransfersOptions { Requested = true },
    },
    Controller = new AccountControllerOptions
    {
        Fees = new AccountControllerFeesOptions { Payer = "application" },
        Losses = new AccountControllerLossesOptions { Payments = "application" },
        StripeDashboard = new AccountControllerStripeDashboardOptions
        {
            Type = "none",
        },
        RequirementCollection = "stripe"
    },
};
var service = new AccountService();
service.Create(options);

但持续触发如下错误:

'When stripe_dashboard[type]=none and requirement_collection=stripe, Stripe must be liable for negative balances or refunds and chargebacks.'

我已设置requirement_collection=stripe,请问问题出在哪里?


解答

错误提示的核心逻辑是:当你同时设置stripe_dashboard[type]=none和requirement_collection=stripe时,必须让Stripe承担负余额、退款及拒付的损失责任,但你的代码里把Losses.Payments设为了application(即你的平台承担损失),这和Stripe的规则冲突了。

解决方法就是修改Losses的配置,将Payments的值改为stripe,让Stripe承担相关损失责任,匹配当前的配置组合要求:

Losses = new AccountControllerLossesOptions { Payments = "stripe" },

修改后的完整Controller配置段:

Controller = new AccountControllerOptions
{
    Fees = new AccountControllerFeesOptions { Payer = "application" },
    Losses = new AccountControllerLossesOptions { Payments = "stripe" },
    StripeDashboard = new AccountControllerStripeDashboardOptions
    {
        Type = "none",
    },
    RequirementCollection = "stripe"
},

调整后就能满足Stripe的规则约束,创建账户时不会再触发该错误。

内容的提问来源于stack exchange,提问作者redoc01

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 19:50:03