#lory1234_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1469437432607801516
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there, looking into this now. looks like this is the request you used to update the schedule, is that correct? https://dashboard.stripe.com/acct_1H2c1XJ0UbsrfDm7/test/logs/req_K2TBTFlQ9GxotZ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
yes
so you'd only like invoices generated on the 6 Feb and 10 Mar? would you want both of those invoices to bill for the same amount?
yes exactly
the invoice of 10 March should be the same amount as the 2nd phase. I dont want to make the user pay for prorations
ok, something you could try would be to have a trial phase from 6 March to 10 March to bridge the gap and not generate an invoice
I see you already are using test clocks so you should be able to test this out and see if it gets you the results you want. I can also try it but might take me longer
does trial_end work if I want to charge, for example 3 days before?
3 days before the end of the phase? I would try it and see. Subscription Schedules can be tricky, I always recommend people try it in test mode whenever possible
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I tried with a trial but it charged double again
hmm, I tried it out on my end. it generated a full invoice on 6 Feb, a $0 invoice on 6 Mar, and a full invoice on 10 Mar. let me reach out to my colleagues to see if they have any ideas, one moment
I am checking it again
ok I double checked with my colleagues and unfortunately we don't think there's a way to do exactly what you want. the options you have are what I suggested, which should generate a $0 invoice on 6 March (not what you want, but the closest we've got) or canceling the subscription and re-starting it on 10 March
this was the phases definition I used for my test:
phases: [{
items: [{
price: PRICE_ID
}],
start_date: "now",
end_date: new Date("Mar 06 2025 12:00").getTime() / 1000,
proration_behavior: "none"
},{
items: [{
price: PRICE_ID
}],
end_date: new Date("Mar 10 2025 12:00").getTime() / 1000,
proration_behavior: "none",
trial: true
},{
items: [{
price: PRICE_ID
}],
end_date: new Date("Apr 06 2025 12:00").getTime() / 1000,
proration_behavior: "none",
}]
okay, thank you for your support. I was using trial_end: timestamp instead of trial and it generated a full amount invoice. I will give it a try as you suggested and check also how it behaves when the new date should be a few days earlier
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
why is it charging even though I set trial: true?
taking a look now
oh, does that mean the user actually pays 0? Im not sure what thos brackets mean
ok, so this is slightly different than the phases I set up in my example. what it looks like you have here is:
6 Feb - 10 Mar : Set as trial
10 Mar - 6 Apr : Normal
6 Apr - 6 May : Normal
What I think you want is:
6 Feb - 6 Mar: Normal
6 Mar - 10 Mar: Trial
10 Mar - 6 Apr: Normal
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
basically you're using that small middle phase to "push" the billing cycle later
ah I see. Since the user has paid first, I wanted to make it a trial from 6 to 10 Mar, and on 10 Mar, they can pay again
right. the user won't be charged for that 6 to 10 Mar phase, but a $0 invoice will be generated. this is just a limitation of how Stripe's subscriptions work
isnt this possible: 6 Feb - 10 Mar : Set as trial (no invoice generation)
10 Mar - 6 Apr : Normal
6 Apr - 6 May : Normal
I dont want to start trial only for the difference of days which could be 1 or 2 days
maybe, but the subscription is created on 6 Feb, right? so the first invoice would be generated then, since we bill ahead of time
and Im worried for the case when I will the offset -2 or -1 days :/
yes the invoice generated on 6 Feb is fine
whats not fine is the one generated on 6 Mar
and Im worried for the case when I will the offset -2 or -1 days :/
I'm not sure what you mean by this, you mean if you need to shorten the phase? like make it end on 4 Mar, for example?
for that, you can shorten the end of the phase, then use billing_cycle_anchor: 'phase_start' on the next phase to change the anchor. so your phases would look like:
6 Feb - 4 Mar : Normal
4 Mar - 4 Apr : set billing_cycle_anchor to phase_start
I apologize, but I have to close Discord for the weekend. we'll be re-opening it on Monday, or if you need support over the weekend, you can reach out to https://support.stripe.com/?contact=true
oh, no worries. Sorry for keeping you late. It was helpful to discuss this with you