简体   繁体   English

创建帐户时出现条带连接错误

[英]Stripe connect error in creating account

I am not able to create account of a customer in my application. 我无法在我的应用程序中创建客户帐户。 The code which I found on stripe documentation id: 我在条纹文档ID中找到的代码:

Map<String, Object> accountParams = new HashMap<String, Object>();
accountParams.put("email", "example@mywyzer.com");
accountParams.put("country", "US");
accountParams.put("type", "custom");
Account account = Account.create(accountParams);

When I run this it gives the this error: 当我运行它时,会出现以下错误:

"You can only create new accounts if you've registered your platform" “只有在注册平台后才能创建新帐户”

I'm not able to create account. 我无法创建帐户。

Can anyone tell me the whole flow of using stripe? 谁能告诉我使用Stripe的全部流程?

I might not be following that flow. 我可能不遵循该流程。

That code is for creating a managed Stripe account as part of Stripe Connect , which I suspect is not what you are trying to do. 该代码用于创建作为Stripe Connect一部分的托管Stripe帐户,我怀疑这不是您要尝试执行的操作。

If you are only interested in charging a customer, you do not need to create a Stripe account for them, only a customer object. 如果您只想向客户收费,则无需为他们创建一个Stripe帐户,只需创建一个客户对象即可。 You would use Stripe Elements or Checkout to collect the customer's payment details and create a token, pass this token to your backend, and then create a customer using that token, as described in the Stripe docs . 您将使用Stripe Elements或Checkout来收集客户的付款明细并创建令牌,将该令牌传递给后端,然后使用该令牌创建客户,如Stripe docs中所述

Map<String, Object> customerParams = new HashMap<String, Object>();
customerParams.put("description", "Customer for elizabeth.williams@example.com");
customerParams.put("source", "tok_visa");
// ^ obtained with Stripe.js
Customer.create(customerParams);

https://stripe.com/docs/api#create_customer https://stripe.com/docs/api#create_customer

您必须通过连接->设置来注册平台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM