Platform Stripe 自动支付给连接的 Stripe 账户不起作用 - 没有这样的外部账户

问题描述

当我尝试向我的平台关联账户付款时遇到了一些奇怪的问题,下面是我如何向关联账户付款的示例代码,其中“源”是一个测试关联账户“acct_1IE4WnG9fsPmbonD”,用作我的支付参数的目的地

PayoutCreateParams payoutCreateParams = PayoutCreateParams.builder()
            .setAmount(amount).setDestination(source)
            .setCurrency(currency).build();
    RequestOptions options = RequestOptions
            .builder()
            .setIdempotencyKey(uuid)
            .setApiKey(stripeKey)
            .build();
    Payout payout = Payout.create(payoutCreateParams,options);

当我尝试执行此操作时出现错误提示

com.stripe.exception.InvalidRequestException:
No such external account: 'acct_1IE4WnG9fsPmbonD'; code: resource_missing; request-id: req_vnLHhOn3WaG9IT

我的用例基本上是支付给可能每月两次的平台连接帐户。

所以现在我想知道我是否对我的平台关联帐户进行了错误的付款!

谢谢。

解决方法

付款旨在转到银行帐户或借记卡,而不是 Stripe 帐户。您可能想要转账,而不是付款:https://stripe.com/docs/api/transfers

或者,如果需要,您可能希望在 setDestination 中使用银行帐户 ID,然后包含 Stripe-Account 标头以进行实际付款:https://stripe.com/docs/connect/manual-payouts#regular-payouts