Currently I’m seeing some strange behavior I haven’t seen before and wanted to know if something changed or if something was unintentionally broken. This is specific to the sandbox environment as far as I know.
- When I cancel a subscription, the response version should be incremented higher than the previous version.
- The subscription response version is exactly the same.
Steps to reproduce:
Create a new subscription within the API Explorer
Cancel the newly created subscription within the API Explorer
Our system heavily relies on the webhooks for CQRS and our read models aren’t properly being updated due a check to see if our datastore’s current version is less than the updated version.
WHERE ... AND Version < UPDATED_RECORD.Version
This update is currently failing due to the version not being incremented as expected. We’re wondering if this is going to be an upcoming change or if this was unintended.
Thanks for the help!
When a subscription is canceled its still valid till the end of the current billing cycle so it’s not updated to be canceled till the end of the current cycle. This is why there isn’t any events triggered.
The event fires as I would expect with the
canceled_date property hydrated with the time of cancellation. Since that property updated, I would expect that the version increments as well.
"canceled_date": null /* Not actually returned, but for discussion purposes */
"version": 1, /* Previously would be 2 */
The behavior I’m describing, the version incrementing on cancellation, is how the API previously behaved. This is a relatively recent change, within the last week or so I would say.
This isn’t applicable to just the Cancellation response, but also the actual webhook payload and subsequent queries. The write does not appear to trigger a version increment.
P.S. I’m seeing this behavior in the sandbox environment, as far as I know production is still functioning as expected.
Okay, I’m reaching out to the team.
And to put anyone’s mind at ease - production is still functioning as expected
I’m circling back to this to see if there has been any update or new information available.
I’m disappointed to say this is the behavior we’re now seeing in production a month later after voicing what we believed was a bug in the lower environment.
Are there any updates you can provide?
Edit: I’ve attached an example webhook event. Our expectation is that when the cancellation occurs, that the entity version is incremented because the entity itself has changed. This is not the behavior we’re seeing. As the example shows the entity version is still
1 even after cancellation occurs.