#animesh5991_api

1 messages ¡ Page 1 of 1 (latest)

rugged torrentBOT
#

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

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

main spadeBOT
#

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.

polar oxide
#

The error message here is

No subscription item with this ID (sub_1P1Lr6JX5V9XswsNhoGxQhmx) on the subscription.
#

This is a POST request, not a GET request. Subscription.retrieve is a GET request

#

Can you double check you are providing the corresponding request id?

languid sparrow
#

yeah

#

I am using python to make the retrieve requests

#

req_U9QV2YKgo3xKxm

#

this is the correct request id

polar oxide
#

No that's a Update Subscription API request

#

It has these parameterse

 cancel_at_period_end: "False",
  expand: {
    0: "latest_invoice.payment_intent",
  },
  items: {
    0: {
      id: "sub_1P1Lr6JX5V9XswsNhoGxQhmx",
      metadata: {
        account_id: "38",
        current: "38",
        new_plan: "41",
        role_id: "58",
      },
      price: "price_1OrH54JX5V9XswsN9fO2liaQ",
    },
  },
  proration_behavior: "always_invoice",
#

Do you recognize it?

languid sparrow
#

Oh right

#

let me check

#

Hey

#

I see but still this should not fail as the susbscription exists, can you please help me with this

#

I should be able to modify the subscription as it exists

polar oxide
#

Okie, so this Update Subscription API, you should pass a subscription item id, not a subscription id inside items

#

si_xxx, not sub_xxx

#

You can find the current Subscription Item Id inside the Subscription, via GET request of Retrieve Subscription API beforehand