简体   繁体   English

Braintree-javascript-如何根据使用量每月向用户收费?

[英]Braintree-javascript - How to charge users monthly based on usage?

After thoroughly searching through the documentation for a plan based on usage, I am stumped on how I can charge my user monthly based on usage of my app. 在彻底搜索文档以基于使用量的计划之后,我对如何根据应用程序的使用量每月向用户收费感到困惑。

For example, customers of my app would post listings. 例如,我的应用程序的客户会发布列表。 Each listing has a button that other users can click. 每个列表都有一个其他用户可以单击的按钮。 I want to charge my customer monthly and based on the number of clicks on customer's listing's button. 我想按客户列表按钮的点击次数每月向客户收费。 The more clicks on the listing's button, the greater the amount charged. 点击列表按钮的次数越多,收费金额就越大。 If nobody clicked on the button in that month, then the monthly bill would be 0. 如果该月没有人单击该按钮,则每月账单将为0。

Since I will be charging my customer monthly, I think this would go under 'Recurring Billing'. 由于我将按月向客户收费,因此我认为这将在“定期结算”下进行。

The current work around I have in my head is to create a plan with a cost of 0 that user would subscribe to. 我现在脑海中的工作是创建一个成本为0的计划,供用户订购。 Then at the end of each month, based off the number of clicks on button (which I keep track of), I would update the subscription's price. 然后在每个月底,根据按钮的点击次数(我会一直跟踪),我将更新订阅的价格。

Would this work? 这行得通吗?

If so, is there a better way to do this? 如果是这样,还有更好的方法吗?

If not, how should I implement this billing behavior? 如果没有,我应该如何实施这种计费方式?

Thanks for reading. 谢谢阅读。

Full Disclosure: I work at Braintree. 全面披露:我在Braintree工作。

Recurring Billing is better suited for charging users on a monthly subscription basis with a relatively stable price. 定期计费更适合按月向用户收费,价格相对稳定。 You may encounter difficulty because you cannot update the price of a subscription that is past due. 您可能会遇到困难,因为您无法更新过期的订阅价格 There are also rules about when you can change the price of a subscription if you are based in the EU. 如果您来自欧盟,还存在有关何时可以更改订阅价格的规则。 There are mechanisms to increment a subscription price called add-ons , but again this is not the usage they were intended for. 一些机制可以提高订阅价格(称为Add-ons) ,但这又不是它们的预期用途。

Since you are already planning to track clicks and update the subscription price on a monthly basis, I recommend simply calculating the price you would like to charge the customer and generating a basic transaction with that amount rather than using subscriptions with the Recurring Billing feature. 由于您已经计划每月跟踪点击并更新订阅价格,因此我建议您仅计算要向客户收取的价格并生成该金额的基本交易 ,而不要使用具有定期结算功能的订阅。

​ I hope this helps. 我希望这会有所帮助。 If you have questions about this or any other details about your specific integration, I recommend reaching out to the Braintree support team to discuss your options. 如果您对此问题或有关您的特定集成的任何其他细节有疑问,我建议与Braintree支持团队联系以讨论您的选择。

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

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