0
votes

I'm using Stripe API (PHP SDK) to create a subscription and later update the quantity of it. I'm unhappy with the way "prorations" behave.

How proration currently behaves:

  1. I create a subscription with quantity of 1 (it costs $10)
  2. A week later I update quantity to 2 in the middle of month
  3. I immediatelly invoice customer
  4. Customer receives invoice for amount less than $10, let's say $7.5 (what's left until the end of current billing cycle) (this is not how I want it)
  5. When billing cycle re-news, customer is invoiced $20 (this is also not how I want it)

How I want it:

  1. I create a subscription with quantity of 1 (it costs $10)
  2. A few days later I update quantity to 2 in the middle of month
  3. I immediatelly invoice customer
  4. Customer receives invoice for FULL billing cycle - $10
  5. When billing cycle re-news, customer is invoiced $10 for the first item and less than $10 for the second, because they have paid something in advance. The total might be something like $17.5

When I invoice for additional quantity, customer must pay for one full billing cycle, not the amount left until the end of current cycle. And then customer pays less next month.

"Update subscription" API has parameter "prorate_behavior", but it doesn't do what I want here: https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior Looks like it only allows to invoice immediately, later, or disable prorations completely.

1
You are correct that this is not how prorating works in the Stripe API, and it's not something that's natively supported. One way you could do it is to add line items manually to represent the amount you want them to pay in the middle of the first invoice, send an invoice for those items at that time, and then add the new plan to the next period with the proration.taintedzodiac

1 Answers

0
votes

I contacted Stripe's support and they confirmed there is currently no way to achieve the behavior in question. Here's their reply:

Prorations are in part a refund for the time used and a charge for the remaining time. This is the standard behavior of a proration.

Unfortunately, there is no way to achieve what you would like to at this point in time. The prorations are always applied to the current billing cycle and not a later date.