【发布时间】:2020-06-04 19:06:46
【问题描述】:
我试图澄清与 Stripe Connect 的 paymentIntent 和 transfers 端点相关的事情。问题是我确实认为我并不完全理解流程,甚至不知道我是否为我的应用程序选择了最佳解决方案。
我正在使用separate charges and transfers 方法,对于帐户类型,我确实选择了custom。
我想要达到的目标如下:
- 从用户 A 处获取资金并将其发送给用户 B(在此上下文中,用户是我的平台用户,而不是 Stripe 帐户或客户)。我想在将钱汇给用户 B 时分一杯羹。如果我确实需要同时创建 Stripe 客户和帐户,这就引出了一个问题。如果转账后拿到钱的用户B不是公司,我为什么要从他/她那里收集行业和其他法律信息来支付?
我做了什么:
首先,我会为我的平台用户创建 Stipe 客户和帐户。然后我:
- 创建 PaymentIntent 以从(Stripe 客户 A)处取款。包括 Stripe 费用
- 创建 PaymentIntent 转移并将其转移到(Stripe Account B)。
- 现在我要创建转帐款项的支付。对于这种情况,我是否必须触发支付端点?
代码中的最后 3 个步骤:
创建支付意图
const paymentIntent = {description, amount, currency, customer_id, transfer_group, payment_method, confirmation_method: 'manual', confirm: true};
const response = await stripe.paymentIntents.create(paymentIntent);
创建转移
const transfer = { amount, currency, destination: destinationAccount, transfer_group };
const response = await stripe.transfers.create(transfer);
stripe.paymentIntents.confirm(response.client_secret, {payment_method: response.payment_method})
现在客户 A 的钱被转移到账户 B,但我不知道我需要从我的平台用户那里获得哪些法律信息才能创建付款?我所有的 Stripe 帐户/客户在添加新来源的同时也接受了tos_acceptance。我的平台用户都不是行业或公司。他们是做自己的事情的个人。
【问题讨论】:
标签: javascript stripe-payments