获取连接的条带帐户的帐户 ID [英] Get account ID of connected stripe account
问题描述
当我运行测试连接用户以通过我的应用程序接受付款时,我将需要帐户 ID 来向他们的帐户收费.
When I run a test for connecting a user to accept payments through my application, I will need the account id to charge their account.
StripeToken::create(
array("customer" => CUSTOMER_ID, "card" => CARD_ID),
array("stripe_account" => CONNECTED_STRIPE_ACCOUNT_ID) // id of the connected account
);
在此代码段(来自 Stripe)中,CONNECTED_STRIPE_ACCOUNT_ID
暗示了以 acct_ 开头的关于 id 的连接
In this snippet (from Stripe), the CONNECTED_STRIPE_ACCOUNT_ID
implies the connecting about id which starts with acct_
我如何获得这个?
谢谢,丰富.
推荐答案
我是从 Google 搜索过来的,遇到了类似的问题.实际上很容易从 OAUTH 流程中获得,文档只是没有说明它是哪个字段.简而言之,缺少的链接是 CONNECTED_STRIPE_ACCOUNT_ID
是您在 OAUTH 流程末尾获得的 stripe_user_id
,当帐户按照 https://stripe.com/docs/connect/standalone-accounts
I came here from a Google search with a similar issue. It is actually easy to get from the OAUTH flow, the documentation just does not make it clear which field it is. In short, the missing link is that the CONNECTED_STRIPE_ACCOUNT_ID
is the stripe_user_id
that you get at the end of the OAUTH flow when the account is connected as per https://stripe.com/docs/connect/standalone-accounts
在流程结束时的示例响应中
In their example response at the end of the flow
{
"token_type": "bearer",
"stripe_publishable_key": PUBLISHABLE_KEY,
"scope": "read_write",
"livemode": false,
"stripe_user_id": USER_ID, //this is it
"refresh_token": REFRESH_TOKEN,
"access_token": ACCESS_TOKEN
}
这篇关于获取连接的条带帐户的帐户 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!