在条带连接中,是否有任何方法可以安排在条带帐户中实际可用的收费金额时进行转移 [英] In stripe connect, is there any way to schedule a transfer to happen when the charged amount actually gets available in stripe account

查看:19
本文介绍了在条带连接中,是否有任何方法可以安排在条带帐户中实际可用的收费金额时进行转移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,感谢您到目前为止对我的帮助.

First of all, thank you for helping me out so far.

我还有一个与条带传输相关的问题.所以我的范围是向客户收费,然后将一部分资金转移给一个关联用户,另一部分转移给另一个用户.我正在使用以下脚本:

I have one more question related to stripe transfers. So my scope is to charge a customer and then transfer a portion of money to one associated user and another portion to another user. I am using following script:

$charge = \Stripe\Charge::create([
    "amount" => $cost,
    "currency" => "usd",
    "customer" => $customerId,
    "transfer_group" => $transferGroupToken
]);

// Create a Transfer to a connected account - Area Dev (later):
$transfer = \Stripe\Transfer::create([
    "amount" => $costPercentage1,
    "currency" => "usd",
    "destination" => $userAccountId1,
    "transfer_group" => $transferGroupToken
]);

// Create a second Transfer to another connected account - Guide (later):
$transfer = \Stripe\Transfer::create([
    "amount" => $costPercentage2,
    "currency" => "usd",
    "destination" => $userAccountId2,
    "transfer_group" => $transferGroupToken
]);

现在这段代码可以工作了,但有一个问题.

Now this code works, but there is one issue.

当我向客户收费时,钱不会立即进入条带账户,但是转账确实会立即发生,所以我的条带账户中需要有足够的资金,否则脚本无法给出资金不足"错误,这完全导致感觉.

When I charge the customer, the money does not come into stripe account right away, however the transfer does happen right away so I need to have sufficient fund in my stripe account otherwise script fails giving "Insufficient funds" error which totally makes sense.

但我更喜欢一种解决方案,我可以以某种方式安排转账,并且在我收到原始付款(我向客户收取的费用)时发生,这样我将始终有足够的资金,因为我只转账部分已收成本.

But I would prefer a solution in which I could somehow schedule the transfer and it happens when I receive the original payment (the cost with which I charged the customer), that way I will always have sufficient fund as I only transfer a part of received cost.

知道如何实现这一目标吗?

Any idea how can I achieve that?

总而言之,问题是:

在条带连接中,是否有任何方法可以安排在条带帐户中实际可用的收费金额时进行转移?

In stripe connect, is there any way to schedule a transfer to happen when the charged amount actually gets available in stripe account?

提前致谢

推荐答案

也许这对您有所帮助?https://stripe.com/docs/connect/charges-transfers#transfer-可用性

那里描述的基本上是一种方法,当资金在您的帐户中时,stripe 接受并安排"转移发生.这会自动创建转移组,这是可能的,因为在初始化时您将其与费用 ID 关联起来.

What is described there is basically a method where stripe takes and "schedules" the transfer to happen when the funds is in your account. This automatically creates the transfer group and is possible because when initializing you link it with the charge ID.

$transfer = \Stripe\Transfer::create([
  "amount" => 1000,
  "currency" => "usd",
  "source_transaction" => "{CHARGE_ID}",
  "destination" => "{CONNECTED_STRIPE_ACCOUNT_ID}",
]);

使用这个时的流条描述:使用此参数时:

Stripes description of the flow when using this: When using this parameter:

转账金额不得超过来源费用金额

The amount of the transfer must not exceed the amount of the source charge

您可以使用相同的 source_transaction 创建多个转移,只要转移的总和不超过源费用

You may create multiple transfers with the same source_transaction, as long as the sum of the transfers doesn’t exceed the source charge

转帐呈现相关费用的待处理状态:如果费用中的资金在 N 天后可用,则目标 Stripe 帐户从转帐中收到的付款也将在 N 天后可用

The transfer takes on the pending status of the associated charge: if the funds from the charge become available in N days, the payment that the destination Stripe account receives from the transfer also becomes available in N days

Stripe 自动为您创建一个 transfer_group

Stripe automatically creates a transfer_group for you

这篇关于在条带连接中,是否有任何方法可以安排在条带帐户中实际可用的收费金额时进行转移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆