简体   繁体   English

创建30多个条带计划,缩放问题

[英]Creating 30+ stripe plans, issue with scaling

So I am using stripe to allow my customers to do recurring billing (on-demand cleaners), the problem I have that at the moment there are 30+ plans a user could be assigned to depending on their inputs. 因此,我正在使用Stripe允许我的客户进行定期计费(按需清洁器),这是我目前有30多个计划可以根据用户的输入分配给他们的问题。 For example: 例如:

User 1: 用户1:

  • Cleaning interval = every 4 weeks 清洁间隔=每4周
  • House size - 4 bed 房屋面积-4张床

plan = A 计划= A

User 2 用户2

  • Cleaning interval = every 6 weeks 清洁间隔=每6周一次
  • House size - 2 bed 房屋面积-2张床

plan = B 计划= B

The above example has loads of permutations, so obviously as we get bigger and we move countries the permutations become greater. 上面的示例有很多排列,因此显然随着我们变大并移动国家,排列变大。

Now my solution to scalability was to create a plan per user (would this scale to 100k plans in stripe)? 现在我对可伸缩性的解决方案是为每个用户创建一个计划(将这种规模扩展到条带化10万个计划)吗?

The second solution was to do token based payments and setup a cron or something similar to process it (how easy would it be) 第二种解决方案是进行基于令牌的支付并设置cron或类似的东西来处理它(这会多么容易)

I am using PHP, so any solution would more than likely be done in this 我正在使用PHP,因此任何解决方案都可能在此完成

I would love some feedback or even case studies on how to solve this 我希望就如何解决此问题提供一些反馈甚至案例研究

Oliver 奥立佛

Stripe does not restrict the number of plans you can create, so you could potentially have tens of thousands of different plans. Stripe不会限制您可以创建的计划数量,因此您可能有成千上万个不同的计划。

However, that doesn't seem like a very good solution. 但是,这似乎不是一个很好的解决方案。 What you could do instead is use the " metered billing " payment flow: 您可以做的是使用“ 计费计费 ”付款流程:

Since it seems you have different billing intervals, you might need to create a few different plans (all for $0, but with different intervals), but the general idea still applies. 由于您似乎有不同的计费间隔,因此您可能需要创建一些不同的计划(全部为$ 0,但间隔不同),但是总体思路仍然适用。

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

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