#NESH
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
That doesn't seem right. That's an updated event, in fact. Could you please share the event ID please?
source customer portal:
evt_1NXNTHJbFADqUCtGvKgcFlFw
source api:
evt_1NXNTOJbFADqUCtGvwVdiPI4
I catch subscription updated event and handle the cancellation:
in both cases subscription.status was active and I ended up with handling same "event" twice
You can look into data.previous_attributes property to see what changed: https://stripe.com/docs/api/events/object#event_object-data-previous_attributes
Only one of these events has the status changed.
what should i look for in this case, to check if cancel_at_period_end went from false to true?
Yes
how to access previous attributes in .net sdk
It should be a part of JSON request body. You are able to see it if you print the event payload?
I see it, I was thinking more is there a chance to access properties of the "PreviousAttributes" with fluent API, something like this
Is it working? Sorry, I am not that familiar with .NET
ah okay. No, it's not working this way as it needs some parsing from json first I guess
You can check this: https://stripe.com/docs/webhooks?lang=dotnet#webhook-endpoint-code