#MikeGreat
1 messages · Page 1 of 1 (latest)
So you want to give a 100% discount for Plan A, but then charge them for Plan A when they upgrade to Plan B?
The specifics are important here, so please try to be explicit
yes , correct. Currently, when the user upgrade to Plan B , it charges 0 amount. What we want is the prorated amount of plan A minus cost of Plan B
I don't think this is possible if you're using a 100% off Coupon on the Stripe side. You would likely have to manually calculate proration on your end and charge it as a one-time Invoice Item when the customer upgrades.
for calculating proration and charge a one time invoice
Also, how will this work for subscription duration
No, you would calculate proration on your own, since Stripe doesn't have an option for doing that on free subscriptions
Charging a one-time Invoice Item is done like this: https://stripe.com/docs/billing/invoices/subscription#manage-invoices
ok, can the invoice be charged immediately
Yup, so you would handle this as a regular Subscription upgrade (see here: https://stripe.com/docs/billing/subscriptions/upgrade-downgrade) which would immediately attempt payment, so you would want to include the update to the Subscription's Invoice in the subscription.update call (see the docs I mentioned above)
Note in particular the explanation about "Immediate Payment" cases:
https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment
ok
@keen lichen charging a one time invoice, how does this impact recurring subscription
What do you mean, exactly?
A separate one-off invoice or a one off invoice generated from a subscriptions pending items?
@viral grotto "I don't think this is possible if you're using a 100% off Coupon on the Stripe side. You would likely have to manually calculate proration on your end and charge it as a one-time Invoice Item when the customer upgrades."by - @keen lichen how do I do this on the api.
after i have calculated the prorated amount. How to do i charge a subscription immediately with that amount
For a manual amount you choose you can either do a fully separate invoice, unlinked from the subscription:
https://stripe.com/docs/invoicing/integration
Or, you can create an invoice item tied to the subscription: https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-subscription
lastly, once i charge the customer for that Invoice. what will be the recurring subscription amount
No, the recurring amount is based on the items in the subscription