#rvk

1 messages · Page 1 of 1 (latest)

gentle agateBOT
mossy zodiac
#

The events that are triggered are checkout.session.complete and payment_intent.succeeded among others depending on your setup. Our docs lay out the object that you will get for each event and link to a section that lays out all of the data on that object https://stripe.com/docs/api/events/types

ivory saffron
#

Are there payment intent related events that are triggered when a user pays through payment link

mossy zodiac
#

Yes, the Checkout Session will either create a payment intent directly or it will create one indirectly through our Invoicing/Subscriptions API

#

Is there a specific thing you are trying to figure out in the post payment events?

ivory saffron
#

When a user pays using the payment link, we want to capture the event/payment info using our API

#

So I am trying to figure what is the even that stripe will send when a user clicks on payment link and pays through it

mossy zodiac
#

Gotcha, those checkout and payment intent events would be the standard ones to listen to. Let me know if you need any help finding a specific piece of data in them or something similar

ivory saffron
#

One more question:

#

If I a have connected accounts for my clients and I want to read events for each of them, how do I set up webhooks to read events for all the clients?

mossy zodiac
#

Basically you can set up one endpoint that gets events for all of your clients and can check which account an event is for once you receive it

ivory saffron
#

But when I look at the event JSON for payment_intent.succeeded under "events" tab in one of the connected account dashboard, no where in the json I see a field that says accountId is the connected client account ID. So if I read this json using a webhook, how can I associate it with the connected client account id?

mossy zodiac
gentle agateBOT
mossy zodiac
#

The code sample in the doc that I linked to demonstrates this. In the highlighted section you can see that it gets the account of the associated event

ivory saffron
#

That makes sense, thank you. I will test out

#

But when I look at the Developer/"events" tab under my connected account for a
payment_intent.succeeded event, the JSON doesn't show "account" field. Do you know why that is the case? And are you saying, I will the "account" field when I read the even through the API?

mossy zodiac
#

I think that that might be because you are viewing the event as your connected account. So the event is rendered as it would be if going to their account webhook, which does not have an account ID in the json. Can you try testing this out in code to check if the account property is set there? As far as I can see in docs and my own testing it always will be for connect events but it won't be set for acount events (as in events sent to account webhooks)