【发布时间】:2021-03-11 07:40:27
【问题描述】:
我正在尝试在使用条带连接付款期间保存信用卡。
我正在关注文档here
但是,文档不适用于条带连接。它们用于常规的条带付款。
我的代码与文档相同,只是我的 paymentIntents 是在关联账户上创建的,因为我希望费用在关联账户上。
stripe.paymentIntents.create({
payment_method_types: ['card'],
amount: Math.round(Number(req.body.stripeData.amount *100)),
currency: userEvent.currency,
description: userEvent.title,
application_fee_amount: Math.round(Number((fees.applicationFee) *100)),
customer: stripeCustomerID
},{
stripe_account: sellerDetails.stripeAccountID,
}
)
这向我抛出了错误 No such customer: 'cus_ITBFODvD6dB1vP',这是有道理的,因为客户是在平台帐户上设置的。
我想将客户和付款方式保存到我的平台账户,然后在关联账户上收费。
有没有一种类似于文档的巧妙方法可以做到这一点,或者我必须做一个解决方法 - 将客户和付款方式保存在平台帐户上的代码,然后自动在连接的帐户上收费
【问题讨论】:
标签: stripe-payments