我正在尝试从payout
对象(https://stripe.com/docs/api#payouts)访问charge
对象(https://stripe.com/docs/api#charges)。问题是我不知道payout
使用什么ID。我尝试使用transfer
中的payouts
ID,但收到错误:
No such payout: tr_1Bxxxxxxxxxx
我也知道payout
的ID格式为po_xxxxxxxxxxxxxxx
,但我无法从charge
,transfer
和balanced_transaction
找到任何内容。 payout
。 {{1}}与收费有什么关系?
答案 0 :(得分:1)
There's not a direct way to get the Payout
from a Charge
object ch_xxxyyyzzz
, but if your account is setup to make automatic payouts, you can get a list of charges and any other balance transactions (refunds, adjustments, etc) that make up a specific payout object.
https://stripe.com/docs/api#balance_history-payout
stripe.balance.listTransactions({payout:"po_xxxyyyyyyzzz",limit: 100 },
function(err, transactions) {
// asynchronously called
});
Payouts and Transfers are two separate types of Objects. A Payout always refers to when moving funds from your balance to your bank account. A Transfer refers to funds moving between Stripe accounts, typically in the context of Stripe's Connect.