#geniosar_subscription-billing-period-trial

1 messages ¡ Page 1 of 1 (latest)

zealous dustBOT
#

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

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

soft orchid
#

It's example of my code

lucid orbit
#

yeah the error is accurate

#

end date needs to be within an item

#

items is within phases

#

end date is within items

soft orchid
#

I need get sheduled item end set it?

lucid orbit
#

What are you trying to do here?

#

Oh sorry

#

I'm wrong actually

#

Ok I know what's happening

#

EndDate is in the correct place in your code. However, when you make an update request to update a subscriptions schedule, we require that you pass all existing phases within items

soft orchid
#

where i can find priceID?

lucid orbit
#

And price, etc

soft orchid
#

it's tooo hard))

lucid orbit
#

The error message is telling you what's wrong

#

You're changing something in the first phase

#

Which has already ended

#

So you can't make updates to it

soft orchid
#

Mmm for change current period end date a i need add new phase?

lucid orbit
#

You do not

#

Can you share the subscription schedule id that you're trying to update so I can see what you're doing wrong?

soft orchid
#

yeap

lucid orbit
#

I just need the id

#

it starts with sub_sched_

soft orchid
#

one sec

#

I can got it from api

#

"sub_sched_1QknEU2NKFm8g2byOBGUclkk"

lucid orbit
#

Oh I think you're passing the wrong start_date

#

Pass 1737726459

soft orchid
#

yeap, work for now , got sucess response, but nothing change

#

current period end date same Feb 23

lucid orbit
#

I see it updated as april

#

from my end

#

Try retrieving the schedule via the api and see if its end_date is reflected properly

#

We don't know much about the dashboard in here

soft orchid
#

one sec

#

U set upper date,

#

2025 05 01

#

1 of may

lucid orbit
#

I'm assuming that's your local timezone

#

Should be 2025-04-30 21:00:00 +0000 utc

#

which is what you passed in the request

#

ie 1746046800

soft orchid
#

aha ok, but current end date in subscription is 2/23/2025 is ok?

lucid orbit
#

It's a monthly subscription

#

So you'll receive the next invoice on 2/23

#

Then 3/23 then 4/23

#

Then your subscription schedule's phase ends 4/30

soft orchid
#

hm, I can't change next invoice date?

#

I want prolong player sub by reward from game, is it possible in stripe?

lucid orbit
#

Can you explain in detail what you're trying to acheive

#

I'm confused what you want

#

You have a subscriptoin that bills monthly right now

soft orchid
#

Ok, Player buy sub for 1 month, for example from today 1/24/2025 to 2/24/2025 In game he won 1 week subscription, I want to change current sub in stripe to 1/24/2025 to 2/31/2025 (2/24/2025 + 1 week )

#

is it possible?

#

and next charge date for user will be not 2/24/2025 but 2/31/2025

lucid orbit
#

February only has 28 days

#

But the goal is to give the customer 1 week free and shift the billing date of the subscription?

soft orchid
#

it's example

#

yeap

#

I wan't move his upcoming invoice

#

to one week

lucid orbit
#

And then what date do you want subsequent invoices to bill on?

#

That shifted date

#

or back to the original date

soft orchid
#

currentEndDate + Duration

#

Duration (1d, 1w, 1m, 1y )

lucid orbit
#

Say the first invoice is March 1, then the customer gets 1 week free so next invoice is the April 8th. Do you want next invoices to be billed May 8th, June 8th, etc, or back to 1st of the month billing?

soft orchid
#

yes

#

1 variant

lucid orbit
#

which one

#

what does that mean

soft orchid
#

best example I want change this date +1 week

lucid orbit
#

Just answer my question please

#

Say the first invoice is March 1, then the customer gets 1 week free so next invoice is the April 8th. Do you want next invoices to be billed May 8th, June 8th, etc, or back to 1st of the month billing?

soft orchid
#

next invoices to be billed May 8th this one

lucid orbit
#

Ah ok

#

So this is possible via adding a new phase to the subscription schedule that starts May 8

#

And giving a discount/credit for the invoice that will be generated May 1

soft orchid
#

can U give me example ? it need create new shedule phase?

lucid orbit
#

yeah

soft orchid
#

And for this phase start date should be end date of previous phase?

lucid orbit
#

So I recommend creating an invoice item: https://docs.stripe.com/api/invoiceitems/create with a negative amount. That will be pulled in as a discount/credit onto the next invoice for the customer. That way you can discount the May 1 invoice to 0. Then, set the current phase to end May 8. Create a new phase that will start May 8 with the same price. That resets billing cycle to bill on the 8th of every month

soft orchid
#

wow)) to hard)

lucid orbit
#

Yeah well what you want is not a common use case

soft orchid
#

And customer will get invoice with 0 amount ?

#

May 1?

lucid orbit
#

Yeah

#

Actually there's 1 other way you can do this

#

That you might prefer

#

You can do this via a trial period ending on May 8th

#

That actually i think will be way easier for you

soft orchid
#

I think about it) but how we separate real trial period from not real))

lucid orbit
#

You would need to do that in your application

#

That's up to you

#

But trial is probably the easiest way to give a week free and also reset the billing date

zealous dustBOT
soft orchid
#

thx for help

lucid orbit
#

No problem

soft orchid
#

before I use canceledAt, but something change)