#nerder-subscription-event
1 messages · Page 1 of 1 (latest)
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
this is strange, because the integration is exactly the same both in prod and test
i'll show you 2 examples
This is the example for when a subscription is created in test mode, with an initial trial period: https://dashboard.stripe.com/acct_1FuM5ALAVB3C1lDI/test/customers/cus_NEIIcRxF349s5P
as you can see here, there is a automatic customer.subscription.updated there
this instead is what happen in production: https://dashboard.stripe.com/acct_1K55cFKdfJxmrRn3/events?related_object=cus_NDpN3xCPmJAHAb&ending_before=evt_1MTRRPKdfJxmrRn3LNkESyik
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)
Can you provide me the exact Event id you are talking about instead of all those pictures/links?
umm, is because you need to check at the chain of events there to understand better
but i'll try
this is the event I see in test: https://dashboard.stripe.com/acct_1FuM5ALAVB3C1lDI/test/events/evt_1MTprvLAVB3C1lDIjwjZuv0I
customer.subscription.updated, Source: Automatic
instad in live mode i don't see it triggered, I only see this: https://dashboard.stripe.com/acct_1K55cFKdfJxmrRn3/events/evt_1MTUYgKdfJxmrRn3hhS82a4K
customer.subscription.created, Source: API
Okay so what's the context? Is this related to your other thread about SEPA Debit + Subscription?
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
gotcha. I'm looking, but will take me a bit, Discord is really busy right now
take your time, is not urgent, I was just curious to understand and might be useful for others
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
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 ✅
sounds good!
thank you for the support, this can be closed