#Austin Jakusz-webhook-events

1 messages · Page 1 of 1 (latest)

hearty flume
#

So checkout.session.completed will always fire when a payment is created, but it won't fire for subsequent payments. For all subsequent payments you would want to listen for payment_intent.succeeded, which should fire for every successful payment made.

Can you elaborate on how that didn't work for you last time?

#

Do you have an example of a payment intent that transitioned top succeeded but didn't fire a payment_intent.succeeded event?

empty parcel
#

I am browsing through our stripe events to find the exact example, if I can, but I think it was when we did the 1 time payment for the first time for a customer so no details had been entered in for that customer. We were expecting that but never received the event and Stripe did not show it in the Events list.

#

Actually, it was the changing of plans annual -> monthly and monthly > annual. We only received customer.subscription.updated and found a common between all of them is the invoice.payment_succeeded with the only exception has been one-time payments.

hearty flume
#

That shouldn't be happening as far as I can tell. All Invoices are built on top of payment intents. You shouldn't have invoices with no payment intent when and upgrade or downgrade occur, as far as I know

empty parcel
#

What if it was for $0.00? Could that be? I can also give you the event ids surrounding this particular time if you want.

hearty flume
#

In that case a payment intent would not be created, so if there is some logic in your workflow that is generating zero-dollar invoices, then listening for invoice.payment_succeeded should work. instead of payment_intent.succeeded

empty parcel
#

The $0 came from going from annual -> monthly -> annual on the billing portal. That was sorta confusing in and of itself but we will cross that bridge later if it continues. Okay, so we would still use payment_intent.succeeded for one time payment right?

hearty flume
#

Yup! That should work just fine.

empty parcel
#

Alright, thank you!