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