#.worming
1 messages · Page 1 of 1 (latest)
So this should only happen if you're upgrading from a free price to a paid one
If you upgrade a sub that has a non-zero price and pass proration_behavior: none, an invoice shouldn't be generated
ok so, since the price is $0, and the new price is different than $0 an invoice is going to be generated and charged anyways
if i want to avoid that, i will have to generate a coupon? do you have any workaround
You could use a subscription schedule to set the exact date/time that the sub will transition to a paid price
https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#existing-subscription
ok i'm going to look at that option... im going to come back if i have any other question.... thx for the help
No problem
your suggestion its using phases?
yeah that's how subscription schedules work
you set all the transition phases
In your case there would be 2 phases: the existing sub, then the transition to the paid price as the second phase
yes, but we need to have a higher plan to use phases
Yeah I don't know about that
We just help with api solutions but aren't familiar with what things cost
ok, im going to review it, and if we cannot use phases what do you think we should do? maybe use a discount coupon?
Or you could just have your system wait to update the sub until the exact date you want an invoice generated
right, we dont want that 'cause we are showing to the customer the upcomming invoice in our portal, and we want to display the upcomming invoice with the new product/price
if we do what you said, the customer is not going to know the new price
How are you doing this?
If the invoice hasn't been created yet
You said yourself you don't want invoice created immediately
after you update the subscription, you can pull the upcoming invoice related to that subscription and should show the new product/price
Yeah but you can use that endpoint even if you don't make the update
That endpoint accepts all params so you can simulate what an upcoming invoice would look like
Read the description here: https://stripe.com/docs/api/invoices/upcoming
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i understand... but we are pulling the subscription and the upcoming invoice is included in the response
we dont have any logic to send how the subscription will be and pull the upcoming invoice
another option could be cancel the current subscription and create a new one using the backdate_start_date and proration_behavior: 'none'
but doing that we lose all the invoices and payments
is there a way to identify the subscription period?
with period i mean:
-
Yearly Subscription created on Jan 1 2023
Today the period for that sub should be 1 -
Monthly Subscription created on Jan 1 2023
Today the period for that sub should be 8
No you'll need to calculate that based off of start date
ok, thanks it was helpful talking to you... have a nice day