#dharmik_webhooks-connect
1 messages ¡ Page 1 of 1 (latest)
đ 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/1263193578503409715
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
@median panther can you give me more details?
see here my events are failing because I haven't handle that in my code, but still I'm getting response from stripe when account realted events occure. On the other hand, when I try to hit payment_intent.successed using stripe cli webhook is not listing even after I have added that in "Listening to". See right bottom corner
sorry those are pictures
Let's take a step back: Where are you creating the PaymentIntent? On your own account (the platform) or on the connected account?
No, I'm testing webhook using ngrok. And creating payment intetnt using stripe cli.
On my platform
Okay so I think that's your issue. You create a Connect WebhookEndpoint that listens to Events made on the connected account. It will not receive Events made on your own platform account
So create a second separate WebhookEndpoint to listen to Events on your own account
dharmik_webhooks-connect
So for own account it's working. It won't work for connected account?
Sorry it's a bit subtle and you are thinking about this wrong (which is not your fault)
You have your own Stripe account where you do things like create a PaymentIntent. This creates Events such as payment_intent.created on your own account. Those Events will be sent to the Account WebhookEndpoint type that you need to create.
Separately you also have connected accounts. Those will get some activity too, for example we might need more information from them to enable/accept payments. Those Events would happen on the connected account such as account.updated. Those Events are sent to your Connect WebhookEndpoint
So you end up with 2 separate WebhookEndpoints to manage
Because, In app there will be destination, when user makes payment.
intent_payload = {
"customer" : user.stripe_customer_id,
"setup_future_usage" : "on_session",
"application_fee_amount" : consumer_charges_cents + provider_charges_cents,
"amount" : total_amount_cents,
"currency" : "usd",
"payment_method_types" : ["card"],
"transfer_data" : {
"destination" : stripe_provider.stripe_id
},
}
payment_object = stripe.PaymentIntent.create(**intent_payload)
okay got it. So, I'll be needing 2 seprate webhook for app. One that focus on connected account and second will be focused on own account for payments. Right?
yes
Okay, Thank you for ur help and saving time.