const account = await stripe.accounts.create({
country: 'US',
capabilities: {
treasury: {requested: true},
issuing: {requested: true}
}
});
const treasury_account =
await stripe.treasury.accounts.create({
account: account.token,
currency: 'usd'
});
const financial_account =
await stripe.financial_account.retrieve({
id: 'fa_123',
stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});
//Financial Account Balances
const availableBalance = financial_account.balance.cash;
const inboundPendingBalance = financial_account.balance.inbound_pending;
const outboundPendingBalance = financial_account.balance.outbound_pending;
await stripe.accounts.update(
account.token,
{
payouts: {
schedule: {delay_days: 0, interval: 'hourly'}
}
}
);
await my_custom_event_handler(
'received_credits',
(received_credit) =﹥ {
await stripe.withdrawal.create({
description: 'Transfer 30% of credits to Capital repayment account',
type: 'balance_transfer',
account: treasury_account.token,
amount: received_credit.amount * 0.30,
currency: 'usd',
payment_method_data: {
account: capital_loan_account.token,
}
});
});
await stripe.issuing.cards.create({
currency: 'usd',
type: 'physical',
source_balance: treasury_account.token
});
用单一 API 请求创建账户对象分分钟内注册用户,验证身份,并为其提供在我们的某个银行合作伙伴那里开设的账户。
发行自定义支付卡,给用户更多方式来消费他们的资金。
const account = await stripe.accounts.create({
country: 'US',
capabilities: {
treasury: {requested: true},
issuing: {requested: true}
}
});
const treasury_account =
await stripe.treasury.accounts.create({
account: account.token,
currency: 'usd'
});