#eneko_subschedule-phases-discrepancy

1 messages ยท Page 1 of 1 (latest)

agile riverBOT
#

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

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

vital cedar
#

Hi there ๐Ÿ‘‹

I see the request you shared is to update an existing Subscription Schedule, how does that fit into your flow of listing Subscription Schedules?

agile riverBOT
hard wyvern
#

sorry about that. you can take this request ID instead, GET subscription_schedules

req_BvmyZbJd6Fmc4u

lavish escarp
#

The first think that sticks out to me is that the dashboard is using the latest API version (2026-01-28.clover) wheras that call would use your account's default version (2020-08-27). If you run this curl command do you start only seeing two phases through curl as well?

  -u API_KEY \
  -H "Stripe-Version: 2020-08-27" \
  -d "expand[]"="phases.items.price"```
#

Looking through our change logs to see what might have changed. Can you tell me more about the phase that is showing up in that cURL command but not otherwise? Like is it before or after the other two?

hard wyvern
#

no, both API versions output the same 3 phases via CURL

#

this is the phase that is missing when not using curl:

{
          "billing_thresholds": null,
          "discounts": [],
          "metadata": {},
          "plan": "price_1Q0j0GAFxlGPwjh5gg8CPqxO",
          "price": {
            "id": "price_1Q0j0GAFxlGPwjh5gg8CPqxO",
            "object": "price",
            "active": true,
            "billing_scheme": "tiered",
            "created": 1726747112,
            "currency": "eur",
            "custom_unit_amount": null,
            "livemode": true,
            "lookup_key": null,
            "metadata": {
              "planType": "ADVANCED"
            },
            "nickname": null,
            "product": "prod_QsTyUcLPc596NW",
            "recurring": {
              "aggregate_usage": null,
              "interval": "month",
              "interval_count": 1,
              "meter": null,
              "trial_period_days": null,
              "usage_type": "licensed"
            },
            "tax_behavior": "exclusive",
            "tiers_mode": "graduated",
            "transform_quantity": null,
            "type": "recurring",
            "unit_amount": null,
            "unit_amount_decimal": null
          },
          "quantity": 5,
          "tax_rates": []
        }
      ],
      "metadata": {},
      "on_behalf_of": null,
      "proration_behavior": "create_prorations",
      "start_date": 1766220666,
      "transfer_data": null,
      "trial_end": null
    }
lavish escarp
#

Gotcha, I now see that that phase has passed. So the two phase responses are trying to only show active and future phases
Also to clarify what is the thing other than the dashboard that is showing you two phases? Is it retrieving the schedule with a specific API library?

#

Also to take a step back, what is your overall goal here? Just to get a consistent picture of the schedules?

hard wyvern
#

Also to clarify what is the thing other than the dashboard that is showing you two phases? Is it retrieving the schedule with a specific API library? > ~~the Stripe node library: https://github.com/stripe/stripe-node~~ actually checked this and we are getting the 3 phases there

what is your overall goal here? Just to get a consistent picture of the schedules? > yes, exactly, we allow modifications of subscriptions through our API and need to fetch all available schedule phases

#

is there any way we can surface those phases in dashboard?

lavish escarp
#

Not that I'm immediately aware of. A lot of our surfaces do try to hide phases that have completely passed. Is there a reason these past phases are specifically needed here? I am trying to think of what may be helpful here, but if Node and the dashboard already agree here, I am unclear on what problems this may be causing.

hard wyvern
#

Node and the dashboard are not showing the same though: node gets us 3 phases, dashboard/workbench only shows 2

lavish escarp
#

Ah gotcha, I misread. Can you make another retrieve in node and send me the request ID from it? I am not seeing a retrieve on that schedule from Node in your recent logs. There should be a way to make it consistent with the dashboard

hard wyvern
#

req_ZByDSMVoN3fNWJ here you go

#

from node, we omit the apiVersion entirely

agile riverBOT
fallow coral
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague needs to go. Looking at the Subscription Schedule (sub_sched_1ShXHwAFxlGPwjh5tQ6cYvcI), I can see there are 3 phases but the first phase is in the past (end date of 1768899066). Is that what you see?

hard wyvern
#

hi, yes, that is correct

fallow coral
#

The dashboard will not display phases in the past. It's a discrepancy in how the API and dashboard return Subscription Schedules

hard wyvern
#

ok, thanks for the clarification!

fallow coral
#

It's a weird quirk. When you perform updates using the API we only require you to pass the current and future phases. This triggers past phases to be dropped in the API response as well. But this schedule hasn't been updated directly since last year so the API still returns the full set.