[英]List all charges of a Connected Stripe Account
我有帶連接的條帶帳戶的條帶平台。
我想獲得對特定關聯賬戶的所有費用。
用戶連接的帳戶 ID:
acct_xxx
我能找到的唯一文檔是針對基於秘密 api 密鑰的檢索客戶。 https://stripe.com/docs/api/charges/list
const stripe = require('stripe')('sk_test_xxx');
const charges = await stripe.charges.list({
limit: 3,
});
我需要獲取關聯賬戶的所有費用。 不對平台客戶收費。
我為 ruby 發現了一個類似的堆棧溢出問題。 獲取通過 Stripe Connect 連接的 Stripe 賬戶的費用清單
我不知道如何使用 node.js 來實現
您需要通過 Stripe-Account header 使 API 調用“連接帳戶”: https://stripe.com/docs/connecteraccounthead
大多數 Stripe 的客戶端庫(如 stripe-node)允許在每個 API 調用 function 中傳遞一個參數,在選項 hash 中,如:
const charges = await stripe.charges.list(
{
limit: 3,
},
{
stripeAccount: 'acct_12345'
}
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.