#Peppa

1 messages ยท Page 1 of 1 (latest)

static skyBOT
dusk flame
#

Hey duchess ๐Ÿ™‚ sorry to bother you so much ๐Ÿ˜“

formal pumice
#

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

dusk flame
#

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?

formal pumice
#

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

dusk flame
#

both actually. yeah I am.

formal pumice
#

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?

dusk flame
#

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

formal pumice
#

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

dusk flame
#

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...

formal pumice
dusk flame
#

in the test environment I shouldn't use the original sub lengths

#

oooh!

formal pumice
#

Yeah that's what test clocks are for

dusk flame
#

thanks

#

i will dive into that. thank you very much

formal pumice
#

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.