#DanTheGoodman - go sdk
1 messages Β· Page 1 of 1 (latest)
Hi there. One moment
So you are seeing this in webhoks?
Can you send event ID's where you are seeing this?
yes, getting the webhooks, but curious why I can see all of these objects in there as well when they aren't in the event info
yeah one sec
evt_1LK4YLCyQAg6NyoSqDTqbEzx
I can dump the struct of a request in go too in a bit
What do you mean by this?
Like what you see in Go is different than what you see on the Dashboard?
so looking at the docs, the webhook should send me just what is shown in the event. But I can also access things like checkout.PaymentIntent.Charges.Data which is checkout->payment_intent->charges
which assumes that the api has then looked up the payment intent and the charges
@hardy ether Let's just handle all the question in this thread
I'm the only one on Discord rn
XD no problem
ok so the charges aren't there, but the payment intent is. This is a CheckoutSession object
case "checkout.session.completed":
var checkout stripe.CheckoutSession
err := json.Unmarshal(event.Data.Raw, &checkout)
if err != nil {
logger.Error().Err(err).Msg("error unmarshalling checkout session")
return c.String(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError))
}
and then simply checkout.PaymentIntent
basically it automatically expanded the customer and payment intent
It looks like it's just placeholder data right?
I don't think it retrieved the info
A bunch of empty strings and "0"s
oh yeah wow that's very deceiving haha
so i need to get the payment intent, then the invoice to see what they got? Seems like the shortest path?
π I'm hopping in since @valid merlin has to head out - are you just trying to see what line items were included in a Checkout Session?
yep π
sorry was driving π
I think I got it now if that's what I need to do. The bigger ocncern i have is the message under this thread where I am not seeing webhooks for events
Copying that message here so it's all in one place:
Another thread π Having some issues with webhooks with stripe, it seems like they are sending but not being shown under the Events tab in developers. I know the account ones are because it's for another account it doesn't show in my events, but for example the setupintent events were never sent to the webhook
Do you have an event ID example I can look at?
yes sorry again >.< in YC call
evt_1LKipSCyQAg6NyoSeykTt7hj
evt_1LKkpvCyQAg6NyoSIeIwHHUP
I'm only seeing connect-type webhooks on that account - is your expectation that this event (that's happening for the platform) would also be sent to your connect-type webhook endpoint?
I would expect that when someone sets up an account to connect to mine, that I would be able to get a webhook about it
how can I know when people successfully setup their connect payout account?
Those events would go through your connect webhook, but the events you sent over are Setup Intents created directly on the Platform - connect isn't involved in those events at all
@hardy ether Does that make sense?
yeah I think so, sorry again YC call with the twitch founders XD. So I need a connect webhook to get events when the setup is finished?
i.e. a valid connect account is established
I guess I will need to listen for the updated or created and see if there is valid properties
Sorry I think there's still a bit of a misunderstanding - you already have a connect webhook, which is working as expected. It's expected that the events you listed aren't coming through on the connect webhook because those events are happening on the platform account itself. Only events that are happening directly on the Connected accounts will come through on your connect webhook.
If you have an account type webhook, that would get these events because account webhooks get events that are happening only on that account
Hi there π taking over
Give me a few minutes to get caught up.
That was both a platform and connect hook
It depends on what you mean. There are webhooks that live on your platform (e.g. events that happen on the platform) and webhooks that live on each of your individual connected accounts (e.g. events that occur due to events triggered on behalf of the connected accounts)
Those two are separate. They can both go to the same webhook endpoint if you set it up that way, but Stripe treats them differently
Ah ok maybe thatβs it, so Iβd have to set it up twice?
Essentially yes. You would set it up once for platform events and once for that platform's connected account events.