#jamestha3d_api

1 messages ¡ Page 1 of 1 (latest)

simple roostBOT
#

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

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

eternal sapphire
#

this is a snippet of my code. i ran this code for yearly and monthly subscriptions. and the yearly subscriptions ran successfully but the montly ones failed.

#

i get this error:
Request req_oNPza1gwtWy9aQ: billing_cycle_anchor cannot be later than next natural billing date (1748107198) for plan

icy silo
eternal sapphire
#

taking a look now. thank you

simple roostBOT
eternal sapphire
#

thank you. i have gone through this

#

how do i proceed now?

#

because i have ran my code and for the 56 annual users the code was successful

#

and for the 57 monthly users do i create a csv and follow this process outlined in the docs?

mighty anvil
#

I am less familiar with the migration process outlined in that doc but it does look like it should work for you. If you reach out to our support team about that process, they can connect you with someone who can speak to the migration process better.
If that for some reason doesn't work, the API workaround would be to create subscription schedules to create each subscription on the date you want it to start in Stripe. https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#start-subscription-future

eternal sapphire
#

okay can you tell me though why i am getting this error Request req_oNPza1gwtWy9aQ: billing_cycle_anchor cannot be later than next natural billing date (1748107198) for plan

and what the natural billing date would be for a monthly subscription

mighty anvil
#

Basically that parameter is intended to be used in situations where you are starting an active subscription partway through the cycle, so it is intended to represent when the next cycle should start. When creating a subscription directly with that endpoint, we assume that you want to start cycling and charging the user monthly now

#

Is that the kind of info you are looking for? Or are you asking something else about that error?

eternal sapphire
#

correct. that is the kind of info i am lookking for thank you. however i am a bit surprised. because i am creating a monthly subscription as follows:
$19.99 monthly on 30/04/2025. i set the billing anchor to 30/04/2025. and it fails with the same error. so i am surprised as to how that is failling. but it works for my yearly subscriptions.

mighty anvil
#

Can you send me the ID of a yearly subscription that was created that way? Was the anchor that you set within the next year?

#

And can you send a request ID from an error with the 30/04/2025 date? The request that I looked at had a date in November, so I would expect that to error that way. We shouldn't error like that when creating a monthly subscription now

eternal sapphire
#

yes iw ill send that now, 1 moment

#

sub_1RHTTfLXvJT74HZxbY9MC0L8

#

this is an example of the annual subscription

#

and this is the request id for the 30/04
Request req_SCMAtjeItRUJO6: billing_cycle_anchor cannot be later than next natural billing date (1748107335)

#

and the billing anchor for that successful sub was set to 01/12/2025

mighty anvil
#

Gotcha, so to explain this error overall, by default if no anchor is provided, we have the subscription cycle after 1 of its intervals on the same day of the month and time of day. So if you made a request to create a yearly subscription right now we would consider the next natural billing date to be 24/04/2026 at 19:40 UTC. We allow you to set a billing cycle anchor within the timeframe of now and when that next natural billing date would be.
For both of those requests I see a billing anchor of 26/11/2025, so that succeeds for yearly subscriptions because that is within a year from now and it fails for monthly subscriptions because that is multiple months away.

eternal sapphire
#

ah i see

mighty anvil
#

My guess on the reasoning for this is that there isn't a way to tell us what to do with the intervening cycles if you set the cycle an anchor away. Like sure we can extrapolate to cycle on the 26th of every month at 17:17:35 but do you want us to charge for each cycle or not charge until then

eternal sapphire
#

looks like all the subscriptions i created have the same billing anchor as 26/11/2025

#

even though i specified different billing anchors. maybe this is a problem from my code. brb

mighty anvil
#

Yeah it may be hard coded somewhere

eternal sapphire
#

oh!

#

now i see that is the problem

#

okay. i have to fix the already created subscriptions

#

how do i do that?

#

can i delete those subscriptions? because they all have the same billing anchor which is nov 26. this is wrong

#

or can i just edit the next billing anchor?

mighty anvil
eternal sapphire
#

if i delete the subscription the customers wont get charged?

mighty anvil
#

Correct, if you delete and create without proration again there won't be any charge upfront