#r.soares

1 messages · Page 1 of 1 (latest)

azure zodiacBOT
hasty musk
#

Hi there!

bold dune
#

Yellow

#

For example, how would i distinguish what changed in evt_1NaxotK9PS1qRjzzyPaMaSWf vs evt_1NaxvHK9PS1qRjzztw6axz2g

hasty musk
#

Thanks! Give me a few minutes to look into this.

jagged hawk
#

Hey! Taking over for my colleague. Let me catch up.

bold dune
#

Ok

jagged hawk
#

One option is to fetch the subscription after each event and check the previous state (you can keep tracking of that in your integration/database)

bold dune
#

That doesnt help much has theres multiple things that could have changed..

#

Is there any way to track an SubscriptionItem added to subscription ?

jagged hawk
azure zodiacBOT
bold dune
#

Yes, but where do i see if a item was added, removed etc ??

#

If it was a plan change or a qnt change ?

jagged hawk
#

I think in the previous_attributes attribute section.

bold dune
#

So what you trying to not say is a need to verify every single parameter there to compare it with current subscription ??

#

When a subscrition was updated we just assinged the new values to our database, now because we are adding more products to a subscription that messes up things has theres no indication what was updated

bold dune
#

Yeah, that all made sense when there wasnt SubscriptionItems...

#

Is there any plans to exanpand the webhooks for SubscriptionItems ?

steel seal
#

not sure what you mean, the items are in the items field of the Subscription object and customer.subscription.updated happens if any of entries in that array changes

bold dune
#

well maybe because when creating a subscription item the id returned wont be the same added if pending_if_incomplete is used makes it hard to know what is what in previous_attributes

#

and since pending_updates doesnt really give any information on what was updated im a bit lost...

#

and all this is happening because subscriptionItems->create doesnt support off_session parameter...

steel seal
#

not understanding your specific problem, try to be more crisp about it. I don't know what it would mean for a SubscriptionItem to be off_session, those concepts seem completely orthogonal.

bold dune
#

Arent you familiar with the off_session parameter in subscription create/update ???

steel seal
#

I most certainly am.

bold dune
#

So what is orthogonal about it ???

steel seal
#

it controls if the payment that's triggered by creating or updating the subscription will be processed off session for the purposes of things like 3DS exemptions

#

it seems orthoganal because I didn't think adding a SubscriptionItem can trigger a payment, perhaps I'm wrong then

bold dune
#

Maybe you are, need a minute to check ??

steel seal
#

if I am, then I woudl say use the Update Subscription API, and update the items field, instead, and write to support to explain the use case and feature request

#

I'm good. What's your question/blocker right now?

bold dune
#

My blocker right now is you trying to be a smart ass instead of trying to understand/help...

steel seal
#

sigh

#

happy to help, what is the question?

bold dune
#

How can i track a subscription item added to a subscription ?

steel seal
#

if an item is added it triggers customer.subscription.updated where previous_attributes shows the previous state of the items array and event.data.object.items is the current state of the items.

bold dune
#

since SubscriptionItem::create returns an id that wont be the id added to the subscription if 3ds is required

#

The question is, isnt there a better way to do it ?? with multiple products & prices in the mix that seems a bit orthoganal..