#matt_connect-events

1 messages ยท Page 1 of 1 (latest)

pliant portalBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1285285930026008738

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

rare galleon
#

matt_connect-events

proper spire
#

We're listening to events, there just doesn't appear to be any events for "Connected account updated config"

rare galleon
#

gotcha. Can you explain what that means? Like "config" could mean 20 different things, if you can tell me exactly what you are talking about I can tell you if something exists

proper spire
#

I think the baseline example is after a new connected account has been added to our account

rare galleon
#

I'm sorry that still doesn't say anything ๐Ÿ˜…

#

Can you give me a clear example of something that doesn't work You say you are listening to Events but did you read the specific doc I shared which is about Events on connected accounts? I assumed you meant you understand that but maybe you didn't realize there's different behaviour for Connect?

proper spire
#

Let's say we have 3 connected accounts within our primary account right now, we would like an event when our primary account has 4 connected accounts.

#

The connected accounts webhook only sends events that originate from those connected accounts

rare galleon
#

Where does the 4th account come from though? How did it appear?

rare galleon
#

Are you using our old OAuth integration? Are you a no-code user?
I'm sorry there are dozens of ways to integrate our products and APIs and I really need a clear 2 sentences summary of what your integration really looks like to help guide you

proper spire
#

We connect accounts both by creating links in the dashboard like the example link above, and by creating links via the python sdk as seen in this code snippet

stripe_account = stripe.Account.create(
    country="US",
    email=responsible_party_email_address,
    capabilities={
        # https://docs.stripe.com/api/accounts/create#create_account-capabilities
        "card_payments": {"requested": True},
        "transfers": {"requested": True},
        "link_payments": {"requested": True},
    },
    controller={
        "fees": {
            # https://docs.stripe.com/api/accounts/create#create_account-controller-fees-payer
            "payer": "application"
        },
        "losses": {
            # https://docs.stripe.com/api/accounts/create#create_account-controller-losses-payments
            "payments": "application"
        },
        # https://docs.stripe.com/api/accounts/create#create_account-controller-requirement_collection
        "requirement_collection": "stripe",
        "stripe_dashboard": {
            # https://docs.stripe.com/api/accounts/create#create_account-controller-stripe_dashboard-type
            "type": "express"
        },
    },
)
account_link = stripe.AccountLink.create(
    account=stripe_account.id,
    refresh_url=refresh_url,
    return_url=return_url,
    type="account_onboarding",
)
return account_link.url
rare galleon
#

Okay so you aren't using OAuth at all. You are actively creating those accounts in this API yourself with your own code.
So you know they exist since you created them. You shouldn't need any Event for that

proper spire
#

These links send the users into the stripe onboarding flow, but we don't currently receive any events after the user has completed that stripe onboarding flow

rare galleon
#

๐Ÿ˜…

#

There is no Event "they closed their tab" yes. There are Events telling you when information is provided, verified or needed. You, as the platform, listen for account.updated Events to track async updates as they happen

Your code also has a return_url that the end user would be redirected to once they are done

proper spire
#

We've had users close their browser before hitting the return URL so we were hoping for something that was more deterministic

#

We haven't always seen account.updated events even in our own controlled environment testing

rare galleon
#

account.updated would only happen if they were actively changing something. If they go there and do nothing then there would be no Event.

Ultimately it shouldn't matter at all though. You have the requirements when you create the Account. You track those. And then until you get the next account.updated Event, you know this is the information needed for the account. and you can nudge them if they don't complete onboarding over time

proper spire
#

In our testing even if the account was successfully updated there would still be no events

rare galleon
#

That should be impossible. If you give me a clear account id where this happened I can have a look

proper spire
#

Give me just a minute and I'll recreate

#

I just created this new account acct_1PzizlKDIlOOoxAG, and there are no additional events about this account on either our primary webhook or the connect account webhook

rare galleon
#

Your Test Connect WebhookEndpoint is currently disabled ๐Ÿ˜…

#

I checked and there is an account.updated Event on that account and it happened 57 seconds after creation, likely when you went through onboarding

#

You can view the Dashboard of that account and look at its Events to confirm

proper spire
#

Ah so it's just not showing up becasue we have the webhook disabled?

#

That makes sense then!

rare galleon
proper spire
#

Oh that's helpful, thank you!!