#hopp8435_webhooks

1 messages ¡ Page 1 of 1 (latest)

subtle mossBOT
wispy shaleBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

subtle mossBOT
#

👋 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/1275293778449797212

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

outer nest
#

hello! I'm not sure what you mean by the event doesn't have the stripe_account via the SDK, can you share the code snippet where you're attempting to read/find the stripe_account on the event?

winged ore
#
def handle_event(event: stripe.Event, service_factory: ServiceFactory) -> None:
    if event.type == "payment_method.attached":
        payment_method: stripe.PaymentMethod = event.data.object
        financial_service = service_factory.get_financial_account_service()
        if (
            hasattr(payment_method, "us_bank_account")
            and payment_method.us_bank_account is not None
        ):
            stripe_account_id = event.stripe_account
            if not stripe_account_id:
                logger.error("Stripe account not found in event")
            financial_service.create_external_account(payment_method, stripe_account_id)
        else:
            logger.error(f"Payment method not found and is not supported: {payment_method.id}")
outer nest
#

this is stripe-python right?

winged ore
#

yup

outer nest
#

shouldn't it be event.account?

winged ore
#

haha yup it should

#

It''s call stripe_account in a lot of other places

outer nest
#

i guess that would fix your issue?