mattwc (who hangs around in this channel sometimes) maintains it
mattwc
Howdy
tr12
hi hi
gilmoregirl joined the channel
skyloath
tr12: it's a bit confusing, so you're saying i can't call the standard api call: `stripe.Event.retrieve("evt_1ADqRbFYGrqwPVpiDNnr3FHG")` if i want to verify a connect account type event exists?
tr12
skyloath: those events are being delivered to your connect webhook endpoint
skyloath
tr12: correct
tr12
any events delivered to that endpoint also have a `user_id` property which indicates what stripe account the event exists on
Chris_m
@skyloath have you set the managed account webhook in the web console?
gilmoregirl has quit
theomo
tr12, got logging working.
var_dump is empty.
tr12
\o/
nuuu
theomo
-.-
Chris_m
@skyloath Its actually called connect webhook and the other is account webhook
tr12
empty as in literally nothing?
theomo
tr12 are you a stripe dev?
Literally nothing
tr12
theomo: yes
ldrivo has quit
theomo
tr12 awesome!
tr12
theomo: just to smoke test, if you do var_dump("potato"); do you get anything?
tr12 Chris_m: to be clear ive setup a webhook for "Endpoints receiving events from Connect applications" to lsiten for events on prod with type: `account.updated`. the docs here (https://stripe.com/docs/webhooks) specify that i can call `event = stripe.Event.retrieve(event_json["id"])` to verify the event. but what you're saying tr12 is i have to instead call the get eevent on the managed account?
tr12
theomo: how about error_log("potato"); ?
alex512 has quit
theomo
tr12, yep works.
bed666 has quit
tr12
wat
theomo
var_dump is empty.
tr12
ok, whatever
theomo
json_decode is simply not working
The module is installed + enabled in php
tr12
let's do something like error_log(var_export(the thing you want to look at));
Chris_m
@skyloath How are you triggering the account update? are you using a live api key? Can you see the webhook in the web console?
the log
tr12
skyloath: those docs are talking about non-connect webhooks - for webhooks about connected accounts, you need to fetch the event from the account it exists on
skyloath
Chris_m: I'm doing it from a python shell with a live api key. i can see the endpoint set in the webhook console
theomo
tr12 blank.
skyloath
tr12: how do i do that, is there a doc for it?
tr12
stripe.Event.retrieve(id, stripe_account="acct_***") will do this
Chris_m
I mean if you go in your web console and sign in as the user do you see the webhook was delivered in the log of events?
tr12
you'd get the account ID with event.user_id
GoJoe__ has quit
skyloath
Chris_m: yes the webhook is delivered, that's not the issue.
theomo
tr12 I think var_dump/export isn't doing what it should be.
skyloath
tr12: okay, once ive got the id. how do i make the api call to get all events for a speicifc managed account
Chris_m
I know but I am just making sure you have actually triggered an account update
event = stripe.Event.retrieve(event_json["id"])
skyloath
Chris_m: sure, well yeah i've done that. i think what tr12 is saying makes sense, just not sure why its not easily documented/how to even do it