#merino-paymentintent-migration

1 messages · Page 1 of 1 (latest)

glass nacelleBOT
floral cedar
#

merino-paymentintent-migration

warped yoke
#

Hey Koopajah how are you doing?

floral cedar
#

Good! What can I help you with?

warped yoke
#

I've been reading the doc "Charges versus Payment Intents APIs" and realized my webhook's been receiving both of them

#

Does stripe process both events every time I mean to charge a customer? Or is it my choice which one should I work with?

floral cedar
#

At a high level a PaymentIntent is a state machine representing the intent to accept a payment from someone. On the other end you have a Charge that represents "one payment attempt"
So if you have an integration built on PaymentIntents (better!) then you will listen to Events associated with the PaymentIntent itself. But you will also get Events associated with each payment attempts that are modeled as a Charge.
It's pretty common to listen to both Events

warped yoke
#

Oh nice!

#

I'm listening to both events and for a while now thought I could be wrong

#

But it makes sense to use both of them

#

Thanks mate, have a good one