加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

如何使用PHP中的API在Stripe付款中降级/升级计划?

发布时间:2020-12-13 17:22:16 所属栏目:PHP教程 来源:网络整理
导读:我已经订阅了一个计划.现在我想降级它.那么我应该取消订阅目前的计划吗?退还剩余金额的过程是什么? 在创建客户的过程中,我创建了客户和订阅客户进行计划.我没有使用Charge类.退款金额我们需要charge_id吗? 解决方法 I have already subscribed to a plan.
我已经订阅了一个计划.现在我想降级它.那么我应该取消订阅目前的计划吗?退还剩余金额的过程是什么?

在创建客户的过程中,我创建了客户和订阅客户进行计划.我没有使用Charge类.退款金额我们需要charge_id吗?

解决方法

I have already subscribed to a plan. Now I want to downgrade it. What will be the process of refunding the remaining amount?

从the API docs开始:

POST https://api.stripe.com/v1/customers/{CUSTOMER_ID}/subscription

Subscribes a customer to a plan,meaning the customer will be billed monthly starting from signup. If the customer already has an active subscription,we’ll update it to the new plan and optionally prorate the price we charge next month to make up for any price changes.

很明显,这就是你想要做的.

To refund amount do we need charge_id?

虽然您可能不需要自行退款,但考虑到更改订阅的方式,docs on refunding表示您确实需要收费ID.

鉴于您的问题的答案完全包含在文档中,我强烈建议您在询问下一个问题之前查看文档.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读