#takahiro_sub-schedule-preview-invoice

1 messages · Page 1 of 1 (latest)

ripe pineBOT
#

👋 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/1422193560769269790

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

lyric wyvern
#

You should create thte preview on the current phase ?

sturdy epoch
lyric wyvern
sturdy epoch
#

but it does not really matter which phase I would like to create a preview in this case imo. the problem is that when subscription schedule has a phase which has already ended how can I create a preview using subscription schedule

#

req_HQomRcPjCXuVoC

lyric wyvern
#

You are making the update on phase 0 too here

lyric wyvern
#

You need to do it on an upcoming phase

sturdy epoch
#

but you can have multiple phases

#

yes I would like to change the upcoming phase

lyric wyvern
lyric wyvern
sturdy epoch
#

in this case I should provide phases? how the payload should look like?

lyric wyvern
#

You pass phase0 as it (same object you get from GET subscription details) and do the changes on phase 1

sturdy epoch
#

I thought so too but could it be possible for you to specify which property in this request detects the change of phase 0? I tried to send the same

lyric wyvern
#

Can you make a GET by id on that Schedule, and share its content here ?

sturdy epoch
#

yes

lyric wyvern
#

I think I found a way to check it

#

no worries

sturdy epoch
lyric wyvern
#

The current phase of the Subscription:
current_phase: {
end_date: 1759104000,
start_date: 1759066216,
}
According to te request body req_O5h7nvsdya5vEb, you are sending different values for phase 0

#

phase 0 must have exactly the same start and end date

sturdy epoch
#

req_HQomRcPjCXuVoC sry I sent the wrong request id

lyric wyvern
#

You are setting proration_behavior: none remove that

sturdy epoch
#

ah nope I did not send the wrong request id lol

#

let me try~

#

do you mean proration_behavior: none in the phase 0? or under schedule_details?

lyric wyvern
#

yes

sturdy epoch
#

phase 0 right?

lyric wyvern
#

yes

sturdy epoch
#

req_FZkgnEeYQk5TxA?t=1759150022 (this is both without phase[0][proration_behavior] and schedule_details[proration_behavior])

#

it still fails...

#

req_EQfzi5bFVgVMHy (this is only without phase[0][proration_behavior])

lyric wyvern
#

req_EQfzi5bFVgVMHy (this is only without phase[0][proration_behavior])
Here you've changed the end_date of the phase

#

Please do inspect each request and make sure you aren't changing the start and end date of the phase 0

#

It should have:
end_date: 1759104000,
start_date: 1759066216,

sturdy epoch
#

but it has

#

"start_date": "1759066216",
"end_date": "1759104000", for phase 0 for req_EQfzi5bFVgVMHy

#

could you have a look the payload of req_EQfzi5bFVgVMHy?

#

If I get correctly you are talking about phase 0 right?

ripe pineBOT
lyric wyvern
#

Ah got confused by the request Ids sorry

#

Let me check further...

fallen bluff
#

Hi, taking over as my teammate needs to step away. Let me catch up.

#

To fully understand what you're trying to do, you'd like to get preview invoice on the next phase and would like to change the quantity?

sturdy epoch
#

yes

#

but the problem here is phase 0

#

im not updating i set the same values

#

but the response says that You can not update a phase that has already ended. Trying to update phase 0.

fallen bluff
sturdy epoch
#

I do not get what you mean by simplify here

#

ah you mean everything the same right?

#

I can try that

#

req_5n1Z5CAvBay4Ej still the same

#

sry I have explained a bit off. quantity 20 is already applied(since phase 1 is already current one). and I would like to see the next cycle preview. (it does not matter much probably but wanted to correct)

fallen bluff
#

So you're not trying to make any updates, you're just trying to attain an invoice preview?

sturdy epoch
#

yes

fallen bluff
sturdy epoch
#

for this specific case yes

#

but it does still not make sence

#

for me

#

if I would like to increase the quantity for the next cycle it will be the same result

#

I would like to know what is causing the phase 0 update

#

and I would like to avoid that

fallen bluff
#

I think the issue is with the date, the phase end date is 2025-09-29 00:00:00 and the request was made at
2025-09-29 13:23:55 UTC

#

I think you could play with the dates here to get the desire behavior

sturdy epoch
#

Sry but it does not solve anything tho

#

could it be possible to escalate and get an answer via email?

fallen bluff
#

The issue is that you're trying to update a phase that has ended.

#

It looks like you're making these updates using the Dashboard instead of the API.

sturdy epoch
#

no im using stripe cli from the dashboard it should act the same

fallen bluff
#

Ah, yes you're using the CLI.

sturdy epoch
#

as i have explain, I am not trying to update phase 0

#

can you check the previous chat with os4m37?

fallen bluff
#

Can you verbalize exact steps you're taking here so I can try to reproduce the issue?

#

If you can share a step by step, I can try to replicate this on my end

sturdy epoch
#
  1. create a subscription with backdating.
  2. create subscription schedule req_yjymmuZ1AGQ3Fl
  3. update subscription schedule req_O5h7nvsdya5vEb
  4. create preview with schedule_details with the same phases
#

the importand thing here is that you have to schedule a phase for the future date and advance the date so that the current phase will be phase 1 (added from update) not phase 0

fallen bluff
#

On these requests from steps 2 and 3, what are you really trying to achieve?

sturdy epoch
#

step 2 is just creating subscription schedule

#

step 3 is updating subscription schedule

fallen bluff
#

I know but with what goals in mind? I'm trying to replicate the exact scenario on my end to help unblock you

sturdy epoch
#

req_O5h7nvsdya5vEb

#

as the payload, it should change the phase 0 (at this point 0 is the current one) end_date and added new phase (increased the quantity to 20).

ripe pineBOT
gilded vapor
#

Hi taking over here

#

Give me a bit to catch up

gilded vapor
# sturdy epoch req_5n1Z5CAvBay4Ej still the same

So just so I understand, this is the last attempt you made to repro this where you are getting an error? Also, it looks like this invoice preview attempt was made from the dashboard. Which flow did you use to initiate it?

#

Off hand I don't seen any differences between the subscription schedule's phase 0 and what you're passing in the request

sturdy epoch
#

problem here is that the response says i am updating phase 0 but I set the same thing

#

im just trying to create preview

#

req_O5h7nvsdya5vEb my question is why this is giving an error response

#

does this mean that I have to recreate the subscription schedule if it contains the phase which has already ended?

#

in order to create preview

gilded vapor
sturdy epoch
#

ah sry

gilded vapor
#

That's why I was using that older request id req_5n1Z5CAvBay4Ej as an example

sturdy epoch
#

req_5n1Z5CAvBay4Ej

gilded vapor
#

Curious how you made that from the dashboard

#

Because to me this looks like it might be a bug

#

Trying to understand the exact steps you made in the dashboard to make that request

sturdy epoch
#

i didnt do this all the steps from dashbaord

gilded vapor
#

Right but that request specifically was made from dashboard

#

The create preview at least

sturdy epoch
#

create preview is from dashbaord but using stripe cli

gilded vapor
#

Ah cli

#

Ok

#

I don't think you're doing anything wrong here... Let me check with a colleague to make sure

#

My guess is this is a bug

sturdy epoch
#

thank you so much for the support

gilded vapor
#

Sure, np

#

Will get back to you when I hear back from my colleague. Waiting on their response

sturdy epoch
#

sry i have to leave now but i will check later this conversation

gilded vapor
#

Ok so they think this might be a gap with the invoice preview api where we only provide a way to pass coupon within phase.discounts[0].coupon but you specified coupon when creating the schedule within phase.coupon

#

So I recommend trying again by only passing in the current phase

ripe pineBOT