我想创建代管功能使用Stripe支付网关。为此,我已经有了3个账户。
( a)有付款方式的连接帐户,该帐户正在付款。
( b)没有任何特定付款方式的连接账户(代管金额将在本账户中持有)
( c)与付款方式相关联的账户(代管金额将存入该账户)
我尝试了两种不同的方法来实现这一点。
const createPaymentIntent = await stripe.paymentIntents.create({
amount: 6500,
currency: 'usd',
payment_method_types: ['card'],
customer: sourceCustomerId,
payment_method: sourcePaymentMethod,
on_behalf_of: destinationAccount,
transfer_data: {
destination: destinationAccount,
},
});
const paymentIntent = await stripe.paymentIntents.confirm(
createPaymentIntent.id,
{ payment_method: 'pm_card_visa' }
);
const charge = await stripe.charges.create({
amount: 9500,
currency: 'usd',
source: destinationAccount,
description: 'My First Test Charge',
});
发布于 2022-04-04 13:08:31
当使用Express或自定义帐户时,平台最终负责连接帐户上的负余额。因此,如果您的尝试借记特快专递或自定义帐户和该帐户没有可用的余额,那么:
如果您想要在您的平台帐户中拥有资金,那么您应该确保连接的帐户有足够的可用余额来支付费用,或者在创建application_fee_amount
时直接使用PaymentIntent获得资金(而不是创建费用)。
https://stackoverflow.com/questions/71736249
复制相似问题