#reyansh-sharma_api

1 messages ¡ Page 1 of 1 (latest)

bitter questBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1245993909289484291

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

last swallow
#

Am I missing to provide any other parameters While requesting to create the subscription?

hollow frigate
#

your plan is daily, you sent the request at 2024-05-31 06:09:21 UTC and you are setting 2024-06-01 07:00:00 as the billing cycle anchor. The error message seems quite self explanatory

message: "billing_cycle_anchor cannot be later than next natural billing date (1717222161) for plan",

unix timestamp 1717222161 is 2024-06-01 06:09:21 UTC

last swallow
#

Thanks, Alex Is it possible to set up the next natural billing date manually as well?

#

I'm not doing anything to set up the natural building date at all.

hollow frigate
#

no, that natural billing date is automatically calculated

last swallow
#

req_gXgYRflqkQHtVx This specific request to create a subscription was a success

hollow frigate
#

that's because the time you submitted that request was 2024-05-31 07:01:06 UTC. So the next natural billing date is 2024-06-01 07:01:06 UTC

last swallow
#

Ah yes that I totally understand

hollow frigate
last swallow
#

Thanks Though it seems I have to change the logic a bit

#

Currently what I'm doing: If the local time is before 6 am use today's UTC 7:00 AM as the Billings cycle anchor if it is after 6:00 AM then use tomorrow at 7 AM UTC.

#

This issue is happening while testing in the IST time zone As the time difference between IST and UTC is a bit high.

hollow frigate
#

I'm not sure i understand the problem. You are passing in the unix timestamp which is in seconds, there's no time difference when you're using unix timestamp