#notdpr

1 messages · Page 1 of 1 (latest)

idle knotBOT
fair leaf
#

@kind dust let's chat here! adding the content of your second message for reference:


We've always responded to the "charge.succeeded" and "customer.subscription.updated" (to handle cancellation) events and this was working fine. But it appears if the person is using Stripe Checkout, then we don't get a "charge.succeeded" event. Instead, it looks like we get a "checkout.session.completed" event.

I'd like to confirm a few things.

1. Is this the case that we must handle both "charge.succeeded" and "checkout.session.completed" of events in order to capture regular stripe invoice sales as well as Checkout?
2. Can we be sure they are mutually exclusive? That is, we won't cause duplicates by responding to both.
3. For a Checkout session, if a subscription is sold, will we still see "customer.subscription.updated" events, i.e. if the customer cancels, even though they used Checkout?

Thanks!```
#

The charge.succeeded event should be fired for Checkout Sessions that resulted in a successful charge

#

checkout.session.completed will only be fired if Stripe Checkout was used to collect payment details. If you listen to both charge.succeeded and checkout.session.completed events, you'll need to deduplicate. you could look at payment_intent.succeeded instead

#

customer.subscription.updated should be fired for subscriptions that were created using Checkout

kind dust
#

Hmm. Here's an example of a checkout.session.completed event evt_1M7yZ5GFSDReNQi2MPc7d0xP for pi_3M7yZ2GFSDReNQi20dEtmvVO

But we got no charge.succeeded event

fair leaf
#

Interesting, I do see the event ID the corresponding charge.succeeded event on my end

kind dust
#

Sorry! My bad. I do see it in our logs now

fair leaf
#

If you look up that PI ID in your dashboard: pi_3M7yZ2GFSDReNQi20dEtmvVO
you should see the events if you scroll to the bottom

#

got it!

kind dust
#

I'll need to dig more

#

Thank you!