#joshualaba
1 messages · Page 1 of 1 (latest)
Hi there!
Hello!
Yes I'm pretty sure. Why?
Could i give you a scenario which seems to be an edge case I can't figure:
- I have a plan with billing date 28th, assuming today is 20th and I cancel the plan -> I will receive a customer.subscription.updated webhook with a canceled_at date immediately. But I will only receive a customer.subscription.deleted webhook only on the 28th am i right?
assuming today is 20th and I cancel the plan
Can you clarify how exactly you cancel the subscription? By updating thecanceled_atproperty?
Erm no, I just cancel the subscription I have on stripe checkout portal
(On test ^)
You mean the customer portal?
Yea right
What's your settings in the customer portal? To cancel te subscription immediately or at the end of the current billing cycle?
Cancel at end of billing period
Got it.
I will receive a customer.subscription.updated webhook with a canceled_at date immediately. But I will only receive a customer.subscription.deleted webhook only on the 28th am i right?
Then yes that's correct
When I receive the customer.subscription.updated webhook, the canceled_at is null though?
is this expected behaviour?
You are correct, instead it should be https://stripe.com/docs/api/subscriptions/object?lang=java#subscription_object-cancel_at_period_end
cancel_at_period_end: true
and on the 28th i will receive a customer.subscription.deleted webhook with canceled_at having a date (NOT NULL)?
I think so. But I recommend to test this on your end. You can use Test Clocks for this: https://stripe.com/docs/billing/testing/test-clocks
Okay got it i think what ur telling is what Im expecting now
Could i ask 1 more qn:
What if the billing date is the 28th, and today the 28th I cancel the plan.
Will I receive both customer.subscription.updated and customer.subscription.deleted webhooks or only 1, customer.subscription.deleted
You should get both I think. But again you can test with this Test Clocks.
awesome, thank you
Happy to help 🙂