#brianp

1 messages · Page 1 of 1 (latest)

lethal quailBOT
rough sonnet
#

I don't know if what I have found is a bug or expected behavior which I need to account for.

topaz sapphire
#

That depends on how you want it to happen

#

You determine whether to prorate the customer when you update the subscription

rough sonnet
#

For Customer on a trialing subscription that ends, it will create a draft Invoice. If the customer changes price at this point, their account is credited.

topaz sapphire
#

Yeah that is expected behavior. Stripe assumes you will collect payment on the invoice generated

rough sonnet
#

The problem is that Customers can switch prices, get an amount credited to their account, and never have to enter payment. Their subscription remains active after the draft Invoice finalized and an attempt to charge is made.

topaz sapphire
#

But the Customer is only allowed to change the Subscription based on your configurations, You can adjust this behavior

rough sonnet
#

Do you have a link to the documentation for this configuration?

topaz sapphire
rough sonnet
#

If I disable proration, will it create 2 Invoices. 1 for the draft Invoice for the previous price and 1 for the price which the Customer new price which the Customer switched to?

topaz sapphire
#

Do you mean the "trial" invoice? The always_invoice option means that a new invoice will be created for whatever charges have been incurred whenever a Customer updates their subscription. So if they are 1 day into a billing cycle on price X and change to price Y, they will get an invoice for 1 day on price X

rough sonnet
#

Is the trial invoice the $0 Invoice?

topaz sapphire
#

Yeah. But that will still prevent the Customer from getting a credit for the price downgrade

rough sonnet
#

I have "Prorate subscription updates" and "Issue invoice at the end of billing period" enabled under the Customer portal settings settings/billing/portal. I want prorations for when Customers switch plans during the middle of the billing cycle.

#

It just seems wrong that Stripe will credit accounts for draft Invoices which Customers did not pay regardless of the setting.

#

I was able to get a free 1 year subscription by changing prices.

topaz sapphire
#

That is something you can configure. And you can apply different configurations each time you direct a user to the Customer Portal

rough sonnet
#

So do I need to check if the Subscription was "trialing" and became "active" and has a draft Invoice and change the proration behavior?

opaque bone
#

👋 stepping in as Snufkin needs to step away

#

If you are going to prorate by default, then yes. You would need to handle the above scenario

rough sonnet
#

So there is another scenario which I can reproduce which allows me to abuse proration and bypass payment.

#

If a Customer's charge fails and their Subscription becomes past_due while they have a Customer portal session open, then can switch plans, get their account credited for the Invoice which they didn't pay, and their subscription remains active.

opaque bone
#

Sure

#

That is the default behavior

#

This is on you to handle

#

It all depends on how you want your integration to work

#

It is impossible to completely prevent nefarious actors with the default behavior here. If you are worried about that then you need to implement controls and configurations yourself for Customer Portal