#cdubs-dotnet-unsetting
1 messages · Page 1 of 1 (latest)
Do you get errors when trying that? Setting them to null is how I thought that us supposed to work
it doesn't look like I'm getting any errors, no
var options = new SubscriptionUpdateOptions
{
CancelAt = null,
CancellationDetails = null
};
var service = new SubscriptionService();
service.Update(subId, options);
Does the subscription return unchanged?
yeah, with the same CancelAt date and cancellation details
Can you run that again and send me the request ID from the call? https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you try setting it to an empty string? ""
yeah, let me try
In C# I'm seeing
Cannot implicitly convert type 'string' to 'System.DateTime?' [Service]csharp(CS0029)
Another weird thing is that I do get a notification that the subscription was updated through my webhooks but it doesn't change anything
Thanks for the request ID. Checking in to this
In stripes UI dashboard I can tell it to not cancel subscription as well, but want to be able to do it from an API
Would you mind clicking that on a test subscription and then sending me the ID of the subscription? Apologies, jumping between a couple threads so I haven't gotten a change to repro this yet
you're good
yeah I can do that
I figured it out
For some reason I also had to include
CancelAtPeriodEnd = false
Not sure why but that seems to do it
Interesting, I am surprised that that is the way to unset this. Good catch on finding that yourself. Is that what the dashboard was sending to undo the cancel?
I'll flag that we should call that out in our docs because that is not obvious at all
No, I was really just trying it as a last resort haha
Gotcha, I'll see how the dashboard does it to see if it does it another, more direct way and will make sure we document this better somewhere.
for sure. Appreciate your help! Have a great holiday
You too!