我正在尝试从 charge
对象 ( https://stripe.com/docs/api#payouts ) 访问 payout
对象 ( https://stripe.com/docs/api#charges )。问题是我不知道付款
使用什么ID。我尝试使用来自 payouts
的 transfer
ID,但收到错误:
没有这样的支出:tr_1Bxxxxxxxxxx
我还知道 payout
的 ID 格式为 po_xxxxxxxxxxxxxxx
,但我在 charge
中找不到任何 ID, 转账
和balanced_transaction
。 付款
与费用有何关系?
最佳答案
没有直接的方法可以从 Charge
对象 ch_xxxyyyzzz
获取Payout
,但如果您的帐户设置为自动付款,您可以获得构成特定付款对象的费用和任何其他余额交易(退款、调整等)的列表。
https://stripe.com/docs/api#balance_history-payout
stripe.balance.listTransactions({payout:"po_xxxyyyyyyzzz",limit: 100 },
function(err, transactions) {
// asynchronously called
});
支付和转账是两种不同类型的对象。付款始终是指将资金从您的余额转移到您的银行帐户。转账是指 Stripe 账户之间的资金转移,通常是在 Stripe Connect 的背景下。
关于node.js - Stripe : Accessing a payout from a charge,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49476417/