#yogesh_api

1 messages ยท Page 1 of 1 (latest)

iron etherBOT
#

๐Ÿ‘‹ 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/1310573997632786508

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

lilac scroll
#

๐Ÿ‘‹ happy to help

#

taking a look at your request now

gloomy burrow
#

I can't pass deleted param since the payment_behavior is pending_if_incomplete

lilac scroll
#

did you try it?

gloomy burrow
#

yes, req_mokC7PVXW2CCXA

lilac scroll
#

ok, in this request req_qwFr0mXzqaAvMt you didn't pass the subscription item ID

#

Oh I see what's happening

gloomy burrow
#

I've passed the Item ID

lilac scroll
#

I'm talking about the first request where you're upgrading to another price

#

the problem in the first request you shared is that the new price you're passing is yearly

#

whereas the subscription already has another monthly price

#

you can't have 2 prices with different intervals on the same subscription

gloomy burrow
#

correct, basically I want to replace the all line items with new one.

#

What should I send in API so that it removes all the current line items with only keeping the new one from payload?

#

That way there will be only one line item of yearly

lilac scroll
#

would you mind trying to delete both existing SIs and adding a new price (instead of updating one and deleting the other)?

gloomy burrow
#

So I've to call multiple update calls?

lilac scroll
#

let's first try it with one update call

gloomy burrow
#

okay, let me try

#

hey, just a doubt. When you say delete existing and adding new one, I should send only the new one without subscription item ID?

#

As I can't pass deleted: true because of payment_behaviour setting

#

I had to make multiple update API calls, to remove items with deleted with payment_behaviour as default_incomplete and then updating the subscription again with new items.

lilac scroll
#

yes unfortunately I was testing this out in parallel

#

and there's no way to accomplish this in 1 API call

gloomy burrow
#

Not an ideal solution

lilac scroll
#

at least not with pending_if_incomplete

gloomy burrow
#

yes, well I'll go with multiple calls for now.

lilac scroll
#

good, one thing you shouldn't forget, is to add the price your removed if the the payment was incomplete