#jasonkuhrt

1 messages ยท Page 1 of 1 (latest)

unique graniteBOT
cobalt kestrel
#

That is the expected behavior and is unfortunately not changable for those price types. I will see if there is something you can so so the fixed prices also get billed at the end of the month and will get back to you

idle fulcrum
#

@cobalt kestrel a solution would be impactable for us, thank you!

cobalt kestrel
#

So, with metered prices you can set a fixed amount on them that will be charged at the end of the month

#

So a potential workaround could be that you make a metered Price with a fixed component and then never report usage on that specific Price

idle fulcrum
#

Interesting

cobalt kestrel
#

Or you could roll your two prices together, have one metered Price with a base fixed amount

idle fulcrum
#

What happens with proration?

cobalt kestrel
#

Was actually about to mention that I need to test that

idle fulcrum
#

Say user X subscribes on September 10, I would like the end of month invoice to discount the fixed amount by 10 days' worth.

unique graniteBOT
idle fulcrum
cobalt kestrel
#

Apologies had trouble finding that. Am testing the proration angle of this and will get back to you.

idle fulcrum
#

Ah thanks, I wasn't looking within the tiers part, makese sense.

cobalt kestrel
#

Yeah, apologies, I forgot that out standard pricing model does not offer a way to do flat fee + metered usage. So it looks like the way to do this may be to have a one-tiered metered usage price

idle fulcrum
#

I'm using test clocks to understand how proration will work here.

#

Ok, it appears that proration did not kick in for the fixed amount of the metered tiered price ๐Ÿ˜ฆ

#

Also, I still see an invoice for $0 being created at the time of subscription. would that invoice be sent to the user, then?

rustic copper
#

๐Ÿ‘‹ stepping in here as Pompey needs to step away

#

Can you share the Subscription ID you just tested with?

idle fulcrum
#

Sure, it is sub_1Nv0BtBWPPbeYrcc6xm1QGTG

rustic copper
#

Thanks taking a look

#

Have you tried using a licensed price for your flat fee?

idle fulcrum
#

Yes, that gets us to the original message of this thread.

#

Oh, maybe you mean tiered, but not metered. Will try...

rustic copper
#

Yeah sorry I should have clarified

#

What you likely want to do here is wait until after the Subscription starts to attach the licensed Price

#

So basically you just don't have it affect the initial Invoice

#

Then it is on every following Invoice for the previous period

idle fulcrum
#

A licensed price does not solve the issue since as you can see Stripe still will charge at the moment the subscription begins:

#

Oh, I'll try that

rustic copper
#

Yeah sorry, I jumped in and missed part of your initial question

#

But I think doing the above is the best

#

Just when you add the new Price you should turn off proration

idle fulcrum
#

@rustic copper it seems that the test clock does not simulate if an email will have been sent or not to a customer.

When the subscription begins, it still creates an invoice for $0, would that lead to an email invoice being sent to the customer for $0? I assume it would. We would prefer it not to. But later, upon each cycle, an email for the invoice should always be sent, even if it is $0.

rustic copper
#

If the Subscription is a send_invoice collection_method then yes it will

#

If charge_automatically then no

#

If you do want to send Invoices in the future then just change the collection_method on your update when you add the licensed Price

idle fulcrum
#

I'm confused about what I'm seeing here when adjusting the subscription as you mentioned to do.

  • Why if I select proration does the bill for dec 1 increase from $1 to $1.94? I would have expected $0.94 or something (something below 1).
rustic copper
#

Because that is the amount that will be tacked onto the next Invoice

#

It is the amount for the remainder of the period plus the amount for the next period

idle fulcrum
#

Then that leads to invoices which are charging the user across multiple periods. This is something we're trying to avoid.

#

Regarding emails, I understand the differences surrounding collection_method. What I'm referring to is the Stripe account level email settings that allow sending email receipts. It seems that Stripe test clocks do not factor in this aspect. Is that correect?

#

So far the approach that has worked best is metered prices that have fixed amounts.

The downside to this is that proratioin has no effect on fixed amount.

However, maybe there is a way to calculate proration ourselves, and then, on a specific invoice, decrease its cost manually?

rustic copper
#

We don't send receipts in test mode

#

But no, we would not send a $0 receipt

#

Since there is no receipt technically

#

Becuase no PaymentIntent/Charge is generated here

idle fulcrum
#

The problem I see with invoice item is that we'll need to work with Stripe webhooks to capture generated invoices, then adjust the amounts, which will require keepings state about how to prorate.

Could another approach be to use coupons attached to the initially created subscription for an amount equal to the proration we want to manually calculate?

rustic copper
#

Hmm let's discuss the first part first.

#

How are the updates going to occur?

#

Like I assume the customer comes on your website and clicks something indicating they want to update, yes?

idle fulcrum
#

I'm not sure what you mean by update.

The customer would come to our website and purchase a plan subscription.

So there will be a new subscription.

rustic copper
#

The whole concern here is about proration on Subscription updates, right?

idle fulcrum
#

With a metered tiered price with a fixed amount added to a subscription at create time we noticed that the Stripe concept of proration does not apply (I don't know why, my intuition is that it should ๐Ÿคท๐Ÿปโ€โ™‚๏ธ).

Make sense?

I am not seeing the need for a subscription update right now.

rustic copper
#

Oh becuase you are setting a future billing_cycle_anchor

#

Sorry, missed that piece

#

So still,

The problem I see with invoice item is that we'll need to work with Stripe webhooks to capture generated invoices, then adjust the amounts, which will require keepings state about how to prorate.
I'm a bit confused here. Don't you just calculate the proration amount and then add an invoice immediately after the creation and then it is picked up by the following Invoice that is generated when the BCA is reached?

#

Why do you have to deal with keeping state?

idle fulcrum
#

I don't understand this part:

add an invoice immediately after the creation and then it is picked up by the following Invoice

unique graniteBOT
rustic copper
#

Are you familiar with how Invoice Items work?

idle fulcrum
#

I am not yet familiar with the invoice items part of the api

rustic copper
#

So basically you could calculate the proration that you want here immediately upon creating the Subscription and add it to then be picked up with the next Invoice

#

That sounds to me like what you are looking for, no?

idle fulcrum
#

That sounds good. Am I to understand then that it is possible for an invoice item to have a negative value?

rustic copper
#

Yep

#

You dictate it via the amount parameter which can be negative

idle fulcrum
#

Nice, this is great for the create subscription case. I currently don't see an issue then.

To confirm: I would use this endpoint https://stripe.com/docs/api/invoiceitems/create and attached the just-created-subscription to it via the subscription payload property. Right?

ember mesa
#

Hello! I'm taking over and catching up...

rustic copper
#

I've got to step away but I'd recommend running a quick test to see if it is what you want