#Gkiokan-discount

1 messages · Page 1 of 1 (latest)

dry schooner
#

👋 happy to help

#

I'm looking into this please hold on for a moment

formal parcel
#

And any clue yet?

dry schooner
#

yes sorry

formal parcel
#

I thought about the noProrate option when upgrading with a coupon. That should eliminate the previews "unsued time calculation"

#

But then the user may be charged over the price

dry schooner
#

still looking into that

formal parcel
#

Sure. Take your time

dry schooner
#

just a general question, why are you deleting a subscription item and generating another item? can't you instead replace the item in the same subscription item?

formal parcel
#

thats how stripe works when you upgrade a tier

#

it's called prorations

dry schooner
#

you could update the same subscription item

#

instead of deleting one and creating another

formal parcel
#

I am not deleting anything

dry schooner
#

I don't think it matters in your case

#

you are passing 2 items in the request that generated this invoice

formal parcel
#

lemme check

dry schooner
#
    0: {
      tax_rates: "",
      price: "price_1L5F3mHa5WPIKK5IK9u2kSLl",
      quantity: "1"
    },
    1: {
      deleted: "true",
      id: "si_LqR8xNVgn6HyRN"
    }
  },```
formal parcel
#

Actually I am only swapping out the tier with the subscriptions->update(...) method

#

It shouldn't show 2 items, thats strange

dry schooner
#

that doesn't affect the proration, it would still be an issue in this case, I was just curious

#

maybe it's our internal SDK that does that

formal parcel
#

As you have said that. In that invoice there are the latest 2 logs but seems to be identical?

#

I will try no prorate as option when a coupon is used. This should kill the "unsued" amount calculation. Even this doesn't seem to be correct.

dry schooner
#

so back to your main question

#

do you want the upgrade to take place at the same time of the subscription update or would you like to wait until the next billing cycle?

#

I will try no prorate as option when a coupon is used. This should kill the "unsued" amount calculation.
I think with no proration you should be fine

#

Even this doesn't seem to be correct.
did you try it?

formal parcel
#

I am about to change the code flow

dry schooner
#

ok let me know if you need any more help

formal parcel
#

Is there a way to tell stripe not allowing customers to have positive balance?

dry schooner
#

unfortunately not

formal parcel
#

What happens with the balance for a customer if he have a positive balance due the retrieved money?

dry schooner
#

it means we add that negative amount as a credit to the customer for future invoices

formal parcel
#

Let's face the fact that I don't want the customers to be able to get their money back once they have paid. Due the prorations and calculations this could lead to problems as sometimes it is not expected when upgrading and downgrading.

dry schooner
#

it's a little bit tricky

#

especially with your discount voucher of 100%

formal parcel
#

interesting

#

the no proration option dosen't seem to went though

dry schooner
#

do you have a request id?

formal parcel
#

can't see any direct request because still trying to figuring it out how stripe does calculate each item. But it is about this invoice in particular where I tried to apply no prorate option. in_1LAtRjHa5WPIKK5Ij4LpR8X0

iron bronze
#

Hey, taking over here

#

You're still passing proration_behavior: "always_invoice"

formal parcel
#

Thanks for the check. Interesting, this shouldn't happen. Lemme see how I can fix that