【问题标题】:No such external account on stripe when trying to payout to bank_account尝试向 bank_account 付款时,条带上没有此类外部帐户
【发布时间】:2017-12-21 08:57:32
【问题描述】:

我正在尝试使用条纹进行支付,所以我做的第一件事就是使用检查我的可用余额

curl https://api.stripe.com/v1/balance
-u sk_test_MkyVP8GpUk______:

它返回这个:

{
  "object": "balance",
  "available": [
    {
      "currency": "usd",
      "amount": 6004,
      "source_types": {
      "card": 52,
      "bank_account": 5952
    }  
 }
],
  "connect_reserved": [
    {
      "currency": "usd",
      "amount": 0
    }
  ],
  "livemode": false,
  "pending": [
    {
      "currency": "usd",
      "amount": 6351,
      "source_types": {
      "card": 12303,
      "bank_account": -5952
     }
   }
 ]
}

我从这个回复中了解到avaiable[card] = 52 这意味着如果我想向信用卡付款,它应该有足够的钱,现在avaiable[bank_account] 有 59,52 美元,因此,我决定使用他们的 API 文档向条带帐户的外部帐户付款:

curl https://api.stripe.com/v1/payouts \
-u sk_test_MkyVP8GpUkur______: \
-d amount=400 \
-d currency=usd \
-d destination=ba_1B3jVULjo5______ \
-H "Stripe-Account: acct_1B0T___"

此目的地 (ba_1B3jVULjo5____) 是该帐户 ID 的外部帐户,问题是当我处理此 curl 时它给了我:

{
  "error": {
    "type": "invalid_request_error",
    "message": "You have insufficient funds in your Stripe account for this transfer. Your card balance is too low.  You can use the the /v1/balance endpoint to view your Stripe balance (for more details, see stripe.com/docs/api#balance).",
    "param": "destination"
  }
}

我该如何解决这个问题?,我对type_source 中的avaiable 余额的理解是否正确?

我确保具有该 ID 的帐户也有一个外部帐户。

提前致谢。

【问题讨论】:

    标签: curl stripe-payments


    【解决方案1】:

    尝试在您的payout creation request 中包含source_type 参数:

    curl https://api.stripe.com/v1/payouts \
      -u sk_test_...: \
      -H "Stripe-Account: acct_..." \
      -d amount=400 \
      -d currency=usd \
      -d destination=ba_... \
      -d source_type=bank_account
    

    请注意,您可以完全省略 destination 参数,除非该货币有多个银行账户并且您希望将资金发送到非默认银行账户。

    【讨论】:

    • 非常感谢您,当我运行balance api 而不将Stripe-Account 放在标题中时,返回的响应属于谁?像上面那个。
    • 另一个问题,当我要求收费时,是否将destination 使条纹转移到目的地的余额,直到将其支付到外部帐户?
    • @AmrAdel 如果不包含Stripe-Account 标头,则请求将在API 密钥所属的帐户上执行。在这种情况下,我假设它是您平台的帐户。是的,当您使用 destination[account] 参数创建费用时,资金会添加到关联账户的余额中。
    • 非常感谢@Ywain,您节省了我的时间。
    • 如何以编程方式获取目标银行账户 ID 请解释或分享任何链接条纹支付@谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-01
    • 2023-04-10
    • 2018-02-21
    • 2020-08-05
    • 1970-01-01
    • 2019-10-10
    • 2018-11-12
    相关资源
    最近更新 更多