【问题标题】:Stripe connect error in creating account创建帐户时出现条带连接错误
【发布时间】:2018-12-12 16:59:54
【问题描述】:

我无法在我的应用程序中创建客户帐户。我在条带文档 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);

当我运行它时,它给出了这个错误:

“只有在您注册了您的平台后,您才能创建新帐户”

我无法创建帐户。

谁能告诉我使用stripe的整个流程?

我可能没有遵循这个流程。

【问题讨论】:

    标签: java stripe-payments stripe-connect


    【解决方案1】:

    该代码用于创建托管 Stripe 帐户作为 Stripe Connect 的一部分,我怀疑这不是您想要做的。

    如果您只对向客户收费感兴趣,则无需为他们创建 Stripe 帐户,只需创建一个客户对象。您将使用 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

    【讨论】:

    • 我对 Customer.create(customerParam) 没有问题。我对 Account.create(accountParam) 有疑问。我正在开发一个 SAAS 模型应用程序,用户必须订阅商业计划才能使用应用程序。
    • @AhsanSharif 好的,你真的在​​使用 Stripe Connect 吗?
    • 在这种情况下,您需要将您的 Stripe 帐户注册为一个平台,如 stripe.com/docs/connect/quickstart#register-platform 中所述
    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-03
      • 2018-02-23
      • 1970-01-01
      • 2023-03-15
      • 2020-06-04
      • 1970-01-01
      • 1970-01-01
      • 2017-06-17
      相关资源
      最近更新 更多