条纹:从收费中获取付款

时间:2018-03-25 13:30:33

标签: node.js stripe-payments stripe-connect

我正在尝试从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,但我无法从chargetransferbalanced_transaction找到任何内容。 payout。 {{1}}与收费有什么关系?

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.

https://stripe.com/docs/transfer-payout-split

相关问题