#Vinz

1 messages · Page 1 of 1 (latest)

rapid compassBOT
wild pivot
#

Hi there!

plush finch
#

Hi soma, here is my case

wild pivot
#

I'm not sure I follow you question. Could you give a concrete example of what you are trying to achieve?

plush finch
#

I have a subscription with :

  • 2 A products/month
  • 1 product B/month
  • 0 product C/month
    So I have a subscriptionItem of :
  • 2 products A/month (with stripe_ID)
  • 1 product B/month (with stripe_ID)
  • 0 product C/month (without stripe_ID)

The subscriber decides after a few days to switch to:

  • 1 product A/month
  • 5 products B/month
    So he makes the modification :
    Stripe schedules the downgrade to 1 product A/month for the next billing cycle → OK

Stripe launches a proration for product B → NOK
How to get the invoice price with proration and request user agreement for this particular invoice?

#

I use python
here is a bunch of code in my view:

            if items_no_proration:
                stripe.Subscription.modify(
                    self.subscription.stripe_id,
                    proration_behavior='none',
                    items=items_no_proration
                )
            if items_proration:
                stripe.Subscription.modify(
                    self.subscription.stripe_id,
                    proration_behavior='always_invoice',
                    proration_date=int(time.time()),
                    items=items_proration
                )
wild pivot
#

How to get the invoice price with proration
When do you want to get the invoice? Before the payment?

plush finch
#

don't know, the simpler the better

#

I want user to know how much he is gonna pay now

wild pivot
#

You want to show the user how much they will pay in the future after they updated their subscription or before?

plush finch
#

ideally before updating subscription.
For the next billing anchor it is easy I do it in my backend. For proration, it's more tricky to display it on the front

wild pivot