#iamyounus_53659
1 messages · Page 1 of 1 (latest)
Can you share the subscription ID (sub_xxx) which the subscription was cancelled immediately even though it was set to cancel_at_period_end?
wait I am sending you
sub_1OUOSGJ3Ij1u6zPiPCIQPd3I
Actually, what is happening is, in the second-to-last event, 'cancel_at_period_end' was set to true. Then, the code to cancel the subscription was executed. However, in the final event that was triggered, the 'cancel_at_period_end' was set back to false
The subscription was canceled due to the subscription cancellation request made by your server: https://dashboard.stripe.com/test/logs/req_96jFoOSXL6OFqS
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Actually, I want to cancel the subscription but not immediately if it is an active state.
so I am cancel_at_period_end changing it to true then cancelling it but it is not working in that way
second last event cancel_at_period_end is set to true
but in last event it is again shown to cancel_at_period_end:false
so I am cancel_at_period_end changing it to true then cancelling it but it is not working in that way
How do you verify that it is not working that way? By settingcancel_at_period_endto true, the subscription will only be canceled at the end of the current period. If the subscription starts at 3 Jan 2023 with monthly subscription, the subscription will only be canceled at 3 Feb 2023 withcancel_at_period_end: true
When you made the request to cancel to the subscription prior to the end of current billing cycle like https://dashboard.stripe.com/test/logs/req_96jFoOSXL6OFqS, subscription will be canceled immediately
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
cancel_at_period_end to true
after updating it to that, the subscription will be canceled automatically after the period ends or should I have to call another function?
Sorry but I am a little confused here
By setting cancel_at_period_end to true, the subscription will be canceled automatically after the period ends. I'd recommend using test clock to test cancel_at_period_end functionality: https://stripe.com/docs/billing/testing/test-clocks
Thanks