Share this post on Twitter

Preview subscription changes

Peter Raboud on April 23, 2015

Upgrades! We love them. You know you’re doing something right when a user wants to pay more for your product. But upgrades can be tricky, too. If you prorate the change, your customers may be confused on how much they’ll be charged on their next bill.

We now offer a preview of upgrade charges for subscriptions before they happen. You can see how switching plans or changing quantities would impact a customer by querying the upcoming invoices endpoint. We’ll return an estimate of the user’s next invoice, including any applicable prorations. You can display this estimate to users to maximize the chance they finish their upgrade.

Here’s an example of what happens when you send a new subscription plan your customer is considering:

curl -G \
   -u sk_test_BQokikJOvBiI2HlWgH4olfQ2: \
   -d customer=cus_66Nqfe223Fjuy0 \
   -d subscription=sub_66Nux8KYRsiquq \
   -d subscription_plan=super_gold_plan

  "date": 1432252223,
  "period_start": 1429808152,
  "period_end": 1432252223,
  "next_payment_attempt": 1432255823,
  "amount_due": 1762

You can also estimate the charge for a subscription change at a specific point of time in the future. Just pass a proration_date when previewing the amount.

We hope this helps provide your customers with more predictable upgrades (or downgrades). If you have any questions or feedback, please let me know.