Manually prorate upgrade

108 views
Skip to first unread message

Kevin Ross

unread,
Apr 16, 2015, 12:15:39 PM4/16/15
to api-d...@lists.stripe.com
Due to some business logic needs, we want to have different a different stripe_subscription for each of our internal subscriptions.  We do want to provide prorated upgrades and the new Invoice.upcoming logic does the prorated calculation for us.  This is all good.

Since we will have a prorated amount, we simply want to create a new subscription with a one-time discount.  We don't want to refund, we just want to apply a credit to the new subscription invoice.

I see that we can create a coupon, and apply it to the customer, but is there an easier one-shot solution where we can do a stripe_customer.subscriptions.create({}) with a discount/credit/negative line item included?

Kevin Ross

unread,
Apr 16, 2015, 12:37:18 PM4/16/15
to api-d...@lists.stripe.com

Assuming the upgrade is from plan A -> B,  perhaps the most ideal solution is to provide a negative line item for plan, which would properly allocate revenue per plan.  Thoughts on a solution?

--
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.

Matthew Arkin

unread,
Apr 16, 2015, 1:00:05 PM4/16/15
to api-d...@lists.stripe.com
You can add a invoice item to the customer before you create the subscription, this still results in 2 api calls, but works better incase you actually use Stripe coupons for other things. An annoyance of this is if the create subscription fails you have to remember to delete that invoice item. 

You can also set the account balance and a plan when you create a customer (I use this to handle set up fees), but then you have to somehow get the card info from one customer to another (or just reask for card info), so not ideal, but only 1 api call.


Jim Danz

unread,
Apr 17, 2015, 3:30:17 PM4/17/15
to api-d...@lists.stripe.com
On Thu, Apr 16, 2015 at 10:00 AM, Matthew Arkin <mar...@kollective.it> wrote:
> You can add a invoice item to the customer before you create the
> subscription, this still results in 2 api calls, but works better incase you
> actually use Stripe coupons for other things. An annoyance of this is if the
> create subscription fails you have to remember to delete that invoice item.
Agreed that invoice items are the best solution here.

> You can also set the account balance and a plan when you create a customer
> (I use this to handle set up fees), but then you have to somehow get the
> card info from one customer to another (or just reask for card info), so not
> ideal, but only 1 api call.
When you only need to work with one subscription per customer, you can
set the account balance and add a plan when updating the customer. It
looks like we dropped this from our documentation to emphasize the
multiple-subscrptions-per-customer api call paths, but it does still
work to do `POST /v1/customers/:id -d account_balance=100 -d
plan=foo`.

Anyhow, just wanted to clarify on that, but my vote is definitely for
the invoice item solution!
Reply all
Reply to author
Forward
0 new messages