#peppemu-connect webhooks
1 messages Β· Page 1 of 1 (latest)
Hi, you could use webhooks to listen to the account.update event https://stripe.com/docs/api/events/types#event_types-account.updated
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
this should be handled in a Connect webhook endpoint
just make sure to have this checkbox checked when creating your endpoint
could you elaborate a bit what the event account.updated refers to
?
not sure if you saw the thread I had yesterday here, maybe it helps
account.updated is the event that Occurs whenever an account status or property has changed.
your connected accounts
I see
where can I check an example of how the event looks like
or of the different account statuses that exist ?
I had a quick look and it looks like the event only indicates that an edit was done to an account
I'd like to then see if the account has a status = enabled
is this doable ?
you're right, there is no status field on the account object
but some other fields might indicate the status of the account
all right, I'll have a look at this one too
This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
π
hey ynnoj
thanks for getting back to me
so I have a few steps lined up on my side and I am stuck at an important one
I setup the webhook listening to the event account.updated
this webhook will trigger an automation which needs to know the account that triggered that webhook
in other cases I include the account at the end of the webhook url by simply adding: ?accountId= "account id here"
how can I do this when setting a webhook from the dashboard
?
Well you should be using a Connect webhook which takes care of this for you: https://stripe.com/docs/connect/webhooks
There'll be an account field in the payload
ah yea, I did this
I dont think this is enough for what I need
you mean that the webhook url when it's triggered will take with it an output array containing all data of the event ?
Can you share the webhook ID or an account.updated event ID?
Yep, that's a Connect webhook. Is the account field not present in the Event payloads sent to it?
Yep! I'd recommend using the CLI to trigger test events
hey @serene mulch it seems like it is not happening
What's not happening? Can you share an example Event ID?
-
I create a test connect account using: POST https://api.stripe.com/v1/accounts?type=express
-
I generate an onboarding URL using: POST https://api.stripe.com/v1/account_links? (for the account of step 1) (Test mode)
-
I open the onboarding url and add all test infos
-
I check the webhoook account.updated in test mode and nothing shows up
I am expecting something to show up here: we_1KqboYDqkOoCRFDgnKEE3pYq
Can you share the ID of the connected account?
acct_1KqcHyRe4yhjAOZP
There's a confusing matrix about how/where events are sent depending on how the account was connected to the platform:
For Connect webhooks, itβs important to note that while only test webhooks will be sent to your development webhook URLs, both live and test webhooks will be sent to your production webhook URLs. This is due to the fact that you can perform both live and test transactions under a production application. For this reason, we recommend you check the livemode value when receiving an event webhook to know what action, if any, should be taken.
https://stripe.com/docs/connect/webhooks
Taking a look
Okay, so here's an account.updated event for that account you just shared: https://dashboard.stripe.com/test/events/evt_1KqcJSRe4yhjAOZPgi5VXzVW
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
And I can see a successful delivery to the webhook endpoint you shared: we_1KqboYDqkOoCRFDgnKEE3pYq
So what exactly do you mean by 'nothing shows up'?
oh that's cool
I see it also on "the other side" where the webhook triggers an automation
and it indeed has an output including the account object
π―
So, it's working as you need?
yea
thanks @serene mulch and @amber scaffold
π ππ½
I am gonna do a couple of tests more before goin live
but the skeleton is there
hey
thanks
I need some help understanding when an account has actually:
charges_enabled = true
and
payouts_enabled = true
so in my process, when testing and adding all info required by the onboarding link, the test account does not have charges_enabled = true nor payouts_enabled - true
I thought that it would have been the case π₯Ά
In the connect page of your dashboard, you can see what else is required. Can you check that?
If you hover over restricted, it should say what fields are required
What does it say?
l
owners address
so without that info, payments and payouts are not enabled, right ?
could you confirm ?
That's correct