gpt4 book ai didi

paypal - Braintree API 更新订阅

转载 作者:太空宇宙 更新时间:2023-11-03 15:47:26 25 4
gpt4 key购买 nike

Braintree API 文档在处理订阅的一些事情上并不完全清楚。

我们正在构建一个具有多个订阅层的系统,并希望让用户能够随时更改订阅层。更新订阅很容易,而且我们已经启用了按比例计费(尽管我们仍然不完全清楚 Braintree 在幕后做了什么)。

我没有看到的部分是如何更新价格。如果我更改计划 ID,价格不会改变。我希望订阅使用新计划的价格 - 我无法想象什么时候更新价格才有意义。我看到我可以传递新价格和新计划 ID,因此我可以在更新计划的同一调用中更新价格,但这意味着我必须将价格存储在我的代码和 Braintree 中。我知道我可以调用 Braintree 上的计划来获取价格信息,但没有必要增加额外 API 调用的开销。

我是不是忽略了什么?真的没有办法告诉 Braintree 使用新订阅的价格吗?

最佳答案

我是 Braintree 的一名开发人员。我们的计划是用于在创建订阅时填充订阅的模板。

来 self 们的 docs :

A plan is a template for your subscriptions: when you create a plan, it will be used to populate the following attributes when a new subscription is created:

  • plan name
  • description
  • trial period
  • billing day of month
  • number of billing cycles
  • amount
  • currency
  • billing cycle

另外我们的 subscriptions更新时不继承新计划的价格

If you update the subscription's plan, the subscription will not inherit the new plan's price.

我们将计划实现为模板,以便商家可以安全地更新计划,而不会影响现有客户的订阅。

当计划 ID 更改时,我们尽量不对订阅状态做出任何假设,以防止其值意外更改。目前没有解决方案可以在更改计划的订阅时从计划中继承选择的属性。

关于paypal - Braintree API 更新订阅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31791341/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com