#hpanseriya_api

1 messages ¡ Page 1 of 1 (latest)

hasty heraldBOT
#

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

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

charred wadi
ivory dragon
#

You are suggesting to use the latest version API?

charred wadi
#

No

#

I just had to incluide that in the link as that API has been removed from the latest version

ivory dragon
#

Ok. Can you please let me know why API gives error?

charred wadi
#

I just did?

You should use the schedule_* parameters instead of subscription and subscription_details

ivory dragon
#

Sorry. Didn't get idea. Can you please explain what you're referring?

charred wadi
#

Did you look at the API reference link I sent? Did you read the error? You can'y use the subscription and subscription_details params in your request because sub_1OrVOiER4mxFRmGRROAa8H8r is controlled by a schedule. You need to use schedule and schedule_details to get the preview you want

ivory dragon
#

Ok. Can you please let me know when we need to use the subscription and subscription_details params ?

charred wadi
#

When the subscription you want to preview an upcoming invoice for is not controlled by a schedule

ivory dragon
#

Ok. Thanks

#

I checked the codebase and we use the subscription and subscription_details for the schedule use case as well and it's working very well for other users. Can you please let me know why it's not working for this specific user?

charred wadi
#

You'd need to share an example where it works

ivory dragon
#

ok

#

Give me 5-10 mins

charred wadi
#

Sure

ivory dragon
#

Here is the request ID: req_yM7fcGmFe7nIQ7.

#

@charred wadi

charred wadi
#

Hmm, I think the general recommendation would be to always use the schedule parameter if you're previewing a subscription controlled by a schedule

#

You wouldn't be able to update the subscription directly regardless, you'd need to update the schedule to make any changes so it makes sense to do the same for the upcoming invoice so it's accurate

charred wadi
ivory dragon
#

Ok