目标参数必须是关联账户
The destination param must be a connected account
我使用 stripe 库进行支付。没有目标参数也不例外,但是当我添加这个参数时,这个异常发生了"The destination param must be a connected account"。
Stripe.apiKey = "sk_test_...";
Map<String, Object> chargeParams = new HashMap<String, Object>();
chargeParams.put("amount", 1000);
chargeParams.put("currency", "usd");
chargeParams.put("source", {TOKEN});
chargeParams.put("destination", {CONNECTED_STRIPE_ACCOUNT_ID});
Charge.create(chargeParams);
对不起我的英语。
创建费用 through the platform 时,destination
参数必须设置为您接受付款的帐户 ID。
在 Stripe 网站的示例代码和您的问题中,您必须将 {CONNECTED_STRIPE_ACCOUNT_ID}
替换为实际的帐户 ID。帐户 ID 是以 acct_
开头后跟随机字母数字字符的字符串。
如果您的平台正在使用 standalone accounts, then you get the account ID in the stripe_user_id
parameter in the last step of the OAuth flow。
如果您的平台正在使用 managed accounts, then you get the account ID when you create an account, in the id
参数。
我使用 stripe 库进行支付。没有目标参数也不例外,但是当我添加这个参数时,这个异常发生了"The destination param must be a connected account"。
Stripe.apiKey = "sk_test_...";
Map<String, Object> chargeParams = new HashMap<String, Object>();
chargeParams.put("amount", 1000);
chargeParams.put("currency", "usd");
chargeParams.put("source", {TOKEN});
chargeParams.put("destination", {CONNECTED_STRIPE_ACCOUNT_ID});
Charge.create(chargeParams);
对不起我的英语。
创建费用 through the platform 时,destination
参数必须设置为您接受付款的帐户 ID。
在 Stripe 网站的示例代码和您的问题中,您必须将 {CONNECTED_STRIPE_ACCOUNT_ID}
替换为实际的帐户 ID。帐户 ID 是以 acct_
开头后跟随机字母数字字符的字符串。
如果您的平台正在使用 standalone accounts, then you get the account ID in the stripe_user_id
parameter in the last step of the OAuth flow。
如果您的平台正在使用 managed accounts, then you get the account ID when you create an account, in the id
参数。