简体   繁体   English

如何以编程方式在 stripe 上创建平台帐户

[英]How to programmatically create a platform account on stripe

I run System tests for my microservices that are using Stripe.我为使用 Stripe 的微服务运行系统测试。 In those tests I create Customers, Payment Methods and Charges on my platform account (listed on the top left in the Dashboard).在这些测试中,我在我的平台帐户(列在仪表板的左上角)上创建了客户、付款方式和费用。 The disavantage is that I have to first manually create a platform and then hard-code the platform's secret key in my code.缺点是我必须先手动创建一个平台,然后在我的代码中硬编码平台的密钥。

I would like to dynamically create account platforms (and get the keys) during the running time of the tests.我想在测试运行期间动态创建帐户平台(并获取密钥)。 Is there an API call or trick to do so directly from my code?是否有 API 调用或技巧可以直接从我的代码中执行此操作?

PS: I tried to use Connect but each connected account created requires administrative informations difficult to mock, such as (Social Security Number) SSN, in order to perform charges on it. PS:我尝试使用 Connect,但创建的每个连接帐户都需要难以模拟的管理信息,例如(社会安全号码)SSN,以便对其进行收费。 Thus making Connect an irrelevant service/solution in my case.因此,就我而言,Connect 成为一个无关紧要的服务/解决方案。

You can't create a platform programmatically, no.您不能以编程方式创建平台,不。 You should just use the test keys of your platform.您应该只使用平台的测试密钥。

You can definitely create connected accounts with your platform in test mode.您绝对可以在测试模式下使用您的平台创建关联帐户。 Yes, you'll need to provide some information to verify the account to enable payments and transfers.是的,您需要提供一些信息来验证账户以启用付款和转账。 Stripe provides test verification data you can use, so you'll just need to embed these values in your flow for creating test connected accounts. Stripe 提供了您可以使用的测试验证数据,因此您只需将这些值嵌入您的流程中即可创建测试连接帐户。

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

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