Hem*_*ngh 8 node.js stripe-payments
await stripe.transfers.create({
amount: amount,
currency: account.default_currency,
source_transaction: chargeId,
destination: accountId
});
Run Code Online (Sandbox Code Playgroud)
Stripe不允许传输到平台区域之外
您可以使用以下方法管理多个国家的业务
首先使用 stripe 创建收费 API 并指定目的地费用
const charge = await stripe.charges.create({
customer: data.customer,
source: data.cardId,
amount: amount,
currency: user.currency,
description: process.env.APP_NAME,
statement_descriptor: process.env.APP_NAME,
application_fee: platformFee,
destination: accountId
});
Run Code Online (Sandbox Code Playgroud)
创建费用后,您可以使用创建付款 API 将该付款转移到该连接的帐户
await stripe.payouts.create({
amount: amount,
currency: currency,
}, {
stripeAccount: accountId,
});
Run Code Online (Sandbox Code Playgroud)
这个流程对我有用
| 归档时间: |
|
| 查看次数: |
5208 次 |
| 最近记录: |