Immediately charge for subscription changes

后端 未结 4 773
梦谈多话
梦谈多话 2020-12-11 03:03

We are using Stripe payment processing for our customer\'s subscriptions. When users change plans, we want them to be charged immediately for the prorated difference. Stripe

4条回答
  •  执笔经年
    2020-12-11 03:32

    You can use billing_cycle_anchor set to now when updating a subscription to force it to change the billing cycle and thus always charge the customer immediately. Personally I think this makes a lot more sense. Also this works well with prorating.

    await stripe.subscriptions.update(subscription.id, {
      billing_cycle_anchor: 'now',
      items: [{ id: itemId, plan: planId }]
    });
    

    https://stripe.com/docs/billing/subscriptions/billing-cycle#changing

提交回复
热议问题