#Peppa
1 messages ยท Page 1 of 1 (latest)
Hey duchess ๐ sorry to bother you so much ๐
That event won't handle the cancel at period end case
You'll need to listen to customer.subscription.updated as we discussed before
And no worries on bothering us
We're here to help
Wait holdon
I am talking about the activation of the premium features
if the user renews their plan, will invoice.paid not be triggered afterwards?
You're talking about renewing after the sub has already been canceled and not canceled at the end of the billing cycle?
Also recommend just trying this all out in test mode
both actually. yeah I am.
It replicates our live mode so you can see how this all works
If you are trying it in test mode, then what behavior are you seeing?
they are rather large objects, and it's impossible for me to go through the whole object to see what the difference is in what usecase. I figured it would be easier if I asked someone with the knowledge.
What I amseeing is the invoice.paid event triggered on purchase
Then, when cancelled, I see the subscription.updated.
Mind you, I am keeping track of 2 datetime in my database
premiumExpiresOn and premiumCancelledOn
where
if premiumExpiresOn > DateTime.Now premium is true
Ok but you should be able to see yourself whether an invoice.paid event is generated
The size of the event object has nothing to do with it being generated or not
no, but that requires me to update the infrastructure project for terraform, add the new product that has a shorter lifetime, etc.
to be fair...
Yeah that's what test clocks are for
No problem
They're very handy for testing subscription scenarios
But to answer your question, you will get an invoice.paid event every time an invoice is paid. So, if a customer had cancelled a subscription then they're renewing, you'll get an invoice.paid when the renewal payment goes through.