#brayden
1 messages · Page 1 of 1 (latest)
Hi there what are you seeing exactly?
The subscription is managed by the subscription schedule sub_sched_1MMKRHALivADE4JrcIjxf5d4, and updating any cancelation behavior is not allowed.
This is the error message that we receive.
We're seeing this when we call:
invoice = Stripe::Invoice.upcoming(
customer: @policy.stripe_customer_id,
subscription: @policy.stripe_subscription_id,
subscription_cancel_now: true
)
We're essentially using this invoice preview to show exactly how much is going to be refunded to the customer if the subscription is actually cancelled.
Seems to have to do with the fact that a sub schedule is attached.. but we've never had this issue before with trying to preview a cancellation invoice. Has something changed?
Can you share the request id so I can take a look?
Hmm I'm not seeing one on the Stripe side..
Should I be able to find that via the subscription page?
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I see logs for previous API Requests.. but nothing for this request
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
This is one of the subscriptions in question
Can you share the error message you're getting then?
The subscription is managed by the subscription schedule sub_sched_1MMKRHALivADE4JrcIjxf5d4, and updating any cancelation behavior is not allowed.
I'm a little confused by this message as we're not actually trying to cancel the subscription.. just generate a preview invoice so that we can determine what the prorated refund would be if we did cancel
Got it thanks. Let me look into why we throw this error
Thank you!
Ah so apparently this is currently expected behavior. We treat that upcoming invoice endpoint as if the update was like a real subscription update, so we just mimic a similar error
I can file feedback with the owning team that you'd like the ability to just preview what would happen if you did cancel
But looks like we currently explicitly throw an error in this case
Is this a new thing? We've never seen this before and we do this several times a day
What is the suggested way to do what we're trying to do here if something has changed?
As stated before, we're basically trying to just preview the amount left on the subscription that would be refunded back to the customer.
Doesn't appear to be a recent change, but I don't have the exact timeline on it
Let me think about workarounds
It seems as if releasing the attached schedule allows us to then preview the invoice. This isn't exactly ideal for us since we're only trying to preview the invoice.. releasing the schedule causes our scheduled renewals to be dropped off of the subscription with no way to reliably re-attach them if we don't actually follow through with the cancellation
One of our agents performed this action as early as yesterday morning. I'm waiting on a link to that subscription to hopefully show these request IDs, if possible.
Yeah if you can provide evidence that this was working as early as yesterday that would be great
But from what I'm seeing in our code, this specific error handling has been in place for a while
Will post that subscription ASAP
@vivid vessel hello, did you find that Subscription ID?
of where this worked before?
also for the error you're getting, would be helpful to:
1/ see the request ID for the upcoming Invoice request
2/ see the raw response body pasted here too (since I cannot see the response of that GET on my end)
you may be right that something changed here but seeing more info could help
Still looking for some examples
This seems to only be affecting policies that have a subscription schedule so we're digging for one that might fit.
We're using the Ruby SDK to make this invoice preview request, so we don't ever really get a raw response, and it doesn't appear that Stripe is tracking that request when it throws an exception. If there's some specific way to get that, please help me understand how to do that!
Stripe is tracking that request when it throws an exception
it does, if you see an error message on a 400'ing request, it should have a request ID
look under https://dashboard.stripe.com/test/logs/
and filter to GET
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ah, great. Found one: req_p0H85XGNLiHWwp
Thanks!
Response body
{ "error": { "message": "The subscription is managed by the subscription schedule sub_sched_1MiRUQALivADE4JrhNepXJ1H, and updating any cancelation behavior is not allowed.", "request_log_url": "https://dashboard.stripe.com/logs/req_p0H85XGNLiHWwp?t=1682092064", "type": "invalid_request_error" } }
thanks, looking
@vivid vessel have some ppl digging, we're assessing if we may have broken something here
if so, we'll try to revert the behavior, there was a recent refactor on the code path you're using re: previewing cancelling a SubSchedule help Subscription
Awesome, thanks for taking a look!
Hello! We've identified this as an issue on our end and are working on reverting the change now.
Excellent, thanks for the help today. Any estimate on when the change might land?
We don't have a specific ETA yet, but my guess is that it will happen sometime today.
Ah, looks like it should be under 3 hours (possibly a lot under).
Great, thanks for the update!