#suraj-subscription-proration
1 messages · Page 1 of 1 (latest)
Hey @barren urchin ! Just to confirm, you are using our Billing product and the Subscription API and you want to simulate what moving the Subscription from Price A to Price B would cost?
If so, I recommend reading:
- https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
- https://stripe.com/docs/billing/subscriptions/prorations
- https://stripe.com/docs/billing/subscriptions/prorations#preview-proration
Those cover how to do this end to end in details
susvscription
okay so look at all the docs I gave you and you should be all set
suraj-subscription-proration
but
before susbcription change i want to know how much cost extra pay for upgrade ?
I understand, that's exactly what I explained above and then linked you to all the relevant docs. The last one is what you need, but you should take 10 minutes to carefully read the first two first to fully understand this
i have already read first two doc
cool then the third doc will answer the last question you have I assume
It tells you exactly what you want to do:
You can retrieve an upcoming invoice to preview changes to a subscription. This API call doesn’t modify the subscription, it returns the upcoming invoice based only on the parameters that you pass. Changing the price or quantity both result in a proration. This example changes the price and sets a date for the proration.
invoice = stripe.Invoice.upcoming(
customer='cus_4fdAW5ftNQow1a',
subscription='sub_49ty4767H20z6a',
subscription_items=items,
subscription_proration_date=proration_date,
)
subscription_proration_date=proration_date, in this field i need which day customer change request write ?
like if 30 days plan and 10 days after i upgrade then this day time i want to give write ?