#Gavin - payment intent events

1 messages · Page 1 of 1 (latest)

obsidian dirge
#

Have you already been trying something like that or does that sound like the missing piece?

small thunder
#

I have been using that

#

err, I used 4242 4242 4242 4242

obsidian dirge
#

Is there a place in this test you are getting stuck?

#

Or are you doing this successfully and not seeing the event?

small thunder
#

$event->type is being returned to me as payment_intent.created

obsidian dirge
#

Do you have a payment intent ID (pi_123) from a time you tried this?

small thunder
#

I can try it again & log the intent ID to see what it is.

small thunder
obsidian dirge
#

And it was successfully sent to a webhook that you have set up. Did you see that in your event handler code?

small thunder
#

ahhhh ok I found the issue. It was a mistake on my part in the code.
When I had set up to log the event, it would overwrite the previously logged events

tough wren
#

Ah nice catch!

small thunder
#

One last question while I'm here.
I see that two events were triggered that seem similar.

invoice.payment_succeeded
payment_intent.succeeded

Would payment_intent.succeeded be for that sessions payment, and then subsequent subscription charges would come as invoice.payment_succeeded? orrrr not?

#

I'm sure it's prob in the docs somewhere if I look, just figured you may know right off

tough wren
#

mostly yes. Invoices are built on top of PaymentIntents. When an Invoice is paid, the underlying PaymentIntent is paid too so you get both events

small thunder
#

Ok, thank you!

#

Is there a way to archive this thread?