#nerder-subscription-event

1 messages · Page 1 of 1 (latest)

clever blazeBOT
lime vortex
#

nerder-subscription-event

#

@modest cloak you must have misunderstood something early on. If you create a Subscription it always sends customer.subscription.created. It never sends the .updated version at all. If you are, or were, getting this in Test mode, it's because you were making additional changes to the Subscription after creation

modest cloak
#

this is strange, because the integration is exactly the same both in prod and test

#

i'll show you 2 examples

#

as you can see here, there is a automatic customer.subscription.updated there

#

the last automatic event is payment_method.attached

#

the rest has been done from the dashboard

#

for sure is something i misunderstood, but i've made my entire integration not handling customer.subscription.created as it seems it was not needed (i'm adding it back now)

lime vortex
#

Can you provide me the exact Event id you are talking about instead of all those pictures/links?

modest cloak
#

umm, is because you need to check at the chain of events there to understand better

#

but i'll try

#

customer.subscription.updated, Source: Automatic

#

customer.subscription.created, Source: API

lime vortex
#

Okay so what's the context? Is this related to your other thread about SEPA Debit + Subscription?

modest cloak
#

no, is unrelated to that

#

the context is, I've developed my integration locally and by the event, I saw triggered I thought that customer.subscription.created was not needed to be handled because it was always followed by an automatic customer.subscription.updated (i thought it was when the subscription move from inactive to active)]

#

instead this doesn't seems to be the case in Live mode

#

so, the question is, why the is an automatic customer.subscription.updated triggered in test which is NOT triggered in live?

#

up there you have the 2 examples and chain of events triggered by the same integration

lime vortex
#

gotcha. I'm looking, but will take me a bit, Discord is really busy right now

modest cloak
#

take your time, is not urgent, I was just curious to understand and might be useful for others

lime vortex
#

Okay so that specific .updated Event you shared was sent because the Subscription's default_payment_method changed async.

#

Let me see what happened in Live mode

modest cloak
#

oh ok, then I think i know why is that

#

is because the non_payment

#

my guess is that is because the payment method was not attached (ie: customer failed 3D Secure), but for subscriptions that starts in trialing is not needed

#

since the first invoice is of 0, there is no need for that

#

so no default_payment_method will be set and therefore no customer.subscription.updated

#

mystery solved ✅

lime vortex
#

sounds good!

modest cloak
#

thank you for the support, this can be closed