#j_r_e

1 messages · Page 1 of 1 (latest)

humble daggerBOT
light moon
#

Hi Jack

languid citrus
#

Hi there, proration is the default behaviour, have you tried it out?

light moon
#

yes I tried it, no bill are generated. while initiating updateSubscription I had to set clearUsage to true otherwhise I was not able to initate the update

#

for the items deleted I set:

                    .setClearUsage(true)
                    .setDeleted(true)
                    .build();```
for the new items:
```.setPrice(price.getId())
                    .build();```

and to initiate the update:

SubscriptionUpdateParams params = SubscriptionUpdateParams.builder()
.setProrationBehavior(ProrationBehavior.ALWAYS_INVOICE)
.addAllItem(items)
.build();
return stripeSubscription.update(params);```

languid citrus
#

What's the subscription ID?

light moon
#

sub_1O4dfuCgWuplQEGZFRCvoi6w

languid citrus
#

All invoices generated for this subscription is $0

light moon
#

yes, the 0$ invoice is generated while creating the subscription

languid citrus
#

Did you ever report usage?

light moon
#

but when I change from one product to another there is no invoice generated

languid citrus
#

Which request? can you share with me the ID?

light moon
#

evt_1O6oadCgWuplQEGZ34fghNSs

#

for this event there is no usage, but I assume that monthly fee will be also prorated ?

languid citrus
light moon
#

I also tried to include usage but same thing, no invoice generated while changing subscription

languid citrus
#

Request ID?

light moon
#

ok, I'll try one more time to generate a usage on this subscription (I swiched it to a PAID Subscription), then I'll send report usage to Stripe and try to switch back to a FREE subscription.
Normally Stripe is generating automatically an invoice in that case correct ?

#

I included a usage for this subscrription, for the subscription item si_OueP3R7BND9qIW

#

and I switched to a FREE subscription but no invoice generated

languid citrus
#

What's the subscription ID?

#

And did you use licensed usage type or still metered usage type?

light moon
#

evt_1O6pDBCgWuplQEGZ4A1aOkZL

#

sub_1O4dfuCgWuplQEGZFRCvoi6w

languid citrus
#

You need to use licensed usage type if you want Stripe to generate a proration.

light moon
#

prod_Oq9DrSX0O5TTbt

#

but there is a fixed amount on my metered usage

#

proration is not calculated with this fixed amount ?

#

and how can I make sure that customer will pay for this usage before switching to a new subscription ?

languid citrus
#

No, Prorations are created only for licensed (per-seat) subscriptions because they’re billed at the start of each billing period.

light moon
#

yes but in that case, if I create two products (one metered, and another one licensed, Stripe will generate two invoices per month)

languid citrus
#

Again for sub_1O4dfuCgWuplQEGZFRCvoi6w, all invoices are $0, there's no invice to pay even after changing the price.

#

No, just one invoice, if both prices are in the same subscriptiong.

light moon
#

yes I know, Stripe is generating this 0$ subscription when creating it, and at the end of the month period, Stripe is generating an invoice based on the usage

light moon
#

and you are sure that prorate invoice will include a protate of the monthly licensed fee + the reported usage ?

languid citrus
#

No, as I said multiple time, prorations are created only for licensed (per-seat) subscriptions

light moon
#

yes I understood, but if my customer change subscription after 10 days, proration is calculated only on the licensed product, that's ok. but if he used my service 50 times and there is a 0,5€ price per usage, I would need an invoice including the prorate of the monthly fee + 50*0,5€ reported usage

languid citrus
#

You can do that, as long as you report the usage. So far you haven't reported any in the subscriptions that you shared earlier.

humble daggerBOT
light moon
#

yes I did, I tried to include 50 report usage

#

but there was no change