Stripe proration feature

578 views
Skip to first unread message

Brian Putt

unread,
Jan 5, 2015, 10:58:47 PM1/5/15
to api-d...@lists.stripe.com
I know this has been discussed before but I was hoping to find out if there were any updates.

It would be extremely beneficial to your customers if there was an API call that would allow us to "preview" an upgrade before it happens. This way, we can tell our customers the total in which they would be charged before they upgrade. Ya, we can calculate the amount, but once you add coupons at the upgrade level, it gets a bit complex.

Greg Sabo

unread,
Jan 6, 2015, 1:51:35 PM1/6/15
to api-d...@lists.stripe.com
Hi Brian -

We've been strongly considering this feature and I think there's a good chance we could implement it.

Could you tell us a bit more about how you would use this feature? For example, would you display the preview amount on the web while the user is upgrading their subscription?

How much time do you think you would need to keep the previewed proration amount before it expired? One hour? Several days?

-Greg

On Mon, Jan 5, 2015 at 7:58 PM, Brian Putt <putt...@gmail.com> wrote:
I know this has been discussed before but I was hoping to find out if there were any updates.

It would be extremely beneficial to your customers if there was an API call that would allow us to "preview" an upgrade before it happens. This way, we can tell our customers the total in which they would be charged before they upgrade. Ya, we can calculate the amount, but once you add coupons at the upgrade level, it gets a bit complex.

--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at http://groups.google.com/a/lists.stripe.com/group/api-discuss/.

To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Brian Putt

unread,
Jan 6, 2015, 9:44:45 PM1/6/15
to api-d...@lists.stripe.com
Hey Greg,

When our customers click the upgrade button, we show them a popup with the expected amount they'll be charged. We make sure they know that the amount is as of now(the date/time). We don't expect the amount to last for very long(< 60 seconds). We're planning on allowing people to add coupons at the time of their upgrade. So they'll see an upgrade amount and then they'd enter a coupon in and get an updated total.

We used to be with Chargify and they had this feature ( https://docs.chargify.com/api-migrations#preview ) and the amount the api call returned was accurate as of the time the API call was made. I don't expect you guys to do anything different unless you want to.

Greg Sabo

unread,
Jan 7, 2015, 7:58:52 PM1/7/15
to api-d...@lists.stripe.com
Hi Brian -

Thanks for elaborating! I'll make sure you're the first to know if we start prototyping this feature.

-Greg

Brian Putt

unread,
Jan 7, 2015, 8:36:27 PM1/7/15
to api-d...@lists.stripe.com
Thanks, I hope you mean when(not if) you start implementing it. Been asking for it for years and doubt I'm the only one ;D

Peter

unread,
Apr 7, 2015, 8:27:01 PM4/7/15
to api-d...@lists.stripe.com
Hi Brian,

We actually just shipped this feature today! I just missed the cutoff for the weekly API announce update, but it'll make it into the email next week.

The upcoming invoice API now allows passing in a subscription_plan parameter, which will simulate updating that subscription to use the provided plan [0]. The response will be what the next invoice for that subscription would look like, if that update was actually done. This invoice will include the line items for prorations done as part of the plan change, if any. You can use this invoice to preview to a customer what the change would cost them.

Upcoming invoices now have an extra field `subscription_proration_date` which records the time for which the prorations were calculated. The recommended way of filtering the invoice preview for only the fake/preview prorations is to filter by `period[start] = subscription_proration_date`.

Since Stripe does proration down to the second, the amount of the prorations can change between the time the preview was done, and the time the actual update is applied. To avoid charging an amount inconsistent with what is previewed to the customer, you can now pass in a new parameter to the subscription update API, `proration_date`. This will perform the prorations as though they were done at the time provided by `proration_date`. By passing in the value of `subscription_proration_date` from the invoice preview as `proration_date`, you can ensure that the applied proration matches up. (We recommend only honoring previewed prices for a limited amount of time. For example, you might want to do a check that the customer pays no more than 30 minutes after they see the initial preview.)

Please feel free to let me know if you have any questions or feedback about how previewing prorations works!

- Peter

Reply all
Reply to author
Forward
0 new messages