#peterAtTenPercent

1 messages ยท Page 1 of 1 (latest)

surreal lotusBOT
thick pier
#

cc @wintry oyster

#

As you can see here, we are quite a bit out from being up to date on your current API

final storm
#

Do you have an example request that I can look at?

thick pier
#

Sure thing.
Here is an older request that has it where trial_period_days was in object.data: we_1Ho9vfEELzdEgNUIGvEOqiGv

Here is a newer request that has trial_period_days in object.data.recurring: evt_1MKP3tEELzdEgNUIOs1C35Xt

final storm
#

You posted a webhook endpoint ID instead of a Request Id for the older request. Can you post the Request ID instead?

thick pier
#

Are you asking for something that is prefixed with evt? So, is the new one that I sent helpful?

#

For some reason I am not seeing web hooks for products earlier than Dec 21st.

final storm
#

No, it would look like req_abc123

#

Err, sorry. Yes, the evt_abc123 is fine

thick pier
#

Okay well the oldest event in our webhook history I can see is req_kyhOjlHJm2FLE0

#

Okay now I am confused because I can see that req_QyN4gBpRohKiaG has trial_period_days in the data.

#

ahhh, okay, so any of the price.updated and price.created webhooks seem to have the recurring object and do not have trial_period_days in the data but instead are using the data.recurring, but any of the plan.updated or plan.created webhook events seem to have trial_period_days in the data.

#

price.updated request id: req_Aa684HZSj3E430
plan.updated request id: req_74HVLySgtT3QXB

#

So I guess it seems like the price versions might have changed their data shape?

final storm
#

So Plans are the legacy object that Prices replaced, so as far as I know, systems with webhook handles that listen for Plan-related events will be entirely different from systems with webhook handlers that listen for Price-related events

thick pier
#

Okay that is helpful. So we will try to remove our listening for plan objects. It also does look like the price shape might have changed for us recently with regard to the location of trial_period_days. Do you happen to have any information about that?

final storm
#

The shape shouldn't have changed as far as I can tell, though that could have been an error on our end. Sorry to ask again, but can you send the 2 Event IDs once more? One Event ID for an old Event that shows the old location of the trial_period_days field on the Price object and another Event ID for a new Event that shows the trial_period_days field on the Price object in a different location.

thick pier
#

Now understanding better that plan and price are different (new employee here inheriting a codebase), I can see that there is this difference in the shape of plans vs prices. We do not have webhook history past Dec 21st of 2022 and so I do not have any evidence of the shape change other than the fact that we were using the plan and price objects interchangeably (not ideal) and now the price objects are clobbering the trial_period_days data value.

As I update this, I want to make sure I understand where the data for trial_period_days will remain. On the price object, it is currently under recurring. However, it is not listed under recurring in the API docs. Is it safe for me to rely on its presence going forward?

#

Also, thank you for your help!

final storm
#

(new employee here inheriting a codebase)
A universally recognized pain-point here on this server

#

Is it safe for me to rely on its presence going forward?
As long as the API version remains the same, then the structure of the object should also remain the same

thick pier
final storm
#

Yes, because the docs will go off of the latest API version

thick pier
#

Okay, well, thanks for your help today ๐Ÿ™‚