#jtishler-subscription-event

1 messages · Page 1 of 1 (latest)

tacit tangle
#

Hi there 👋 taking a look now

#

That's because this is a new subscription for this customer, so you would want to listen for customer.subscription.created

sinful tartan
#

ah okay

#

but if you create a subscription in an incomplete state with DEFAULT_INCOMPLETE wouldn't that event have already happened?

tacit tangle
#

I'm not sure I understand the question. This subscription was created and charged immediately, so that behavior doesn't really apply here.

sinful tartan
#

my understanding of subscriptions with the payment element is that first you create a subscription attached to a customer with the DEFAULT_INCOMPLETE state. so a subscription is created but it needs to have its payment method added and confirmed later. then shortly after, we confirm the payment/setup intent on the client. so that would be an update to the existing subscription

tacit tangle
#

That would be the case if you were to do this via a custom Subscription handling (e.g. not using Stripe's automatic collection features), but this particular subscription had a single POST request to create the subscription and charge an existing Customer: https://dashboard.stripe.com/test/logs/req_iAKUau5VK5Kxdg

sinful tartan
#

oh oops my bad it seems i wasn't hitting my new code path when testing this

#

sorry about that!