【发布时间】:2023-02-24 10:35:01
【问题描述】:
如何从关联账户退款?
我尝试将 stripeAccount 放到 refunds.create 方法中:
const refund = await stripe.refunds.create({
payment_intent: validPaymentIntentId, // "pi_randomid"
amount: validAmount,
}, { stripeAccount: validStripeAccountId });
它说找不到付款意向:
没有这样的 payment_intent: 'pi_randomid'
这就是我创建付款意向的方式:
const paymentIntent = await stripe.paymentIntents.create({ amount, currency, customer, on_behalf_of: stripeAccountId, transfer_data: { destination: stripeAccountId, }, });因此,代表关联帐户创建的付款意向。当必须退款时,我希望从关联帐户中提取退款。但它表示即使在仪表板上列出,也找不到付款意向。
【问题讨论】:
标签: javascript node.js stripe-payments