#midnightcrow

1 messages · Page 1 of 1 (latest)

peak wolfBOT
pearl leaf
#

Hello! Not sure what you mean by "types". Also not sure what version 12.12.0 refers to. Is this related to a specific language and object types?

tidal dirge
#

The issue I am coming across is this:
Property 'plans' does not exist on type 'Phase'

#

Types, as in I am importing the types from stripe node module.


Latest version: 12.12.0 published 17 hours ago

https://github.com/stripe/stripe-node```
pearl leaf
#

Ah, so this is about Node, gotcha.

#

Not sure why there would be "plans" on there... it would be Prices if anything, but can you share the code that's throwing that error?

tidal dirge
#

If you look at a subscription_schedule.updated event, it has a phases array. Inside the phases array is a plans array.

"id": "evt_1NRFtGDKXn4ivDe317rxPWEd",

#

the plans array looks like this

            {
              "billing_thresholds": null,
              "metadata": {
              },
              "plan": "price_1LFgLVDKXn4ivDe3EG8EQ9Qq",
              "price": "price_1LFgLVDKXn4ivDe3EG8EQ9Qq",
              "quantity": 1,
              "tax_rates": [
              ]
            }
          ]```
pearl leaf
#

Ah, okay, that's because you're on a really old API version (2018-05-21). The phases.plans property on Subscription Schedules was renamed to phases.items in API version 2020-08-27: https://stripe.com/docs/upgrades#2020-08-27

tidal dirge
#

I am not doing a create call or an update call on a schedule. I am listening for the subscription_schedule.updated event, when the event gets to me it has this format.

#

By "this format" I mean the one with the plans array.

pearl leaf
#

Right, that's because the "format" you're getting it in is in the old 2018-05-21 API version you have configured.

tidal dirge
#

Where is that configuration in stripe?

pearl leaf
#

It's your default API version as set in the Dashboard under the Developers tab. Note that upgrading your default API version is dangerous and can break your integration, so please use extreme caution when changing it! More details here: https://stripe.com/docs/upgrades#how-can-i-upgrade-my-api

tidal dirge
#

ok ty and last thing, can you tell me what stripe node version is assosiated with the 2018-05-21 API version?

pearl leaf
#

There isn't one.

#

Node is a dynamic language, and versions of the Node library historically haven't been pinned to a specific API version. You could either specify an API version when initializing the library, on a per request basis, or by default it would use your default API version. However, in recent versions of the Node library (starting with v12), we have started to pin to a specific API version. See here for details: https://github.com/stripe/stripe-node/blob/master/CHANGELOG.md#1200---2023-04-06

#

Did you start running into issues when you upgraded your Stripe Node library from an older version?