#dharmik_webhooks-connect

1 messages ¡ Page 1 of 1 (latest)

lean urchinBOT
#

👋 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.

distant sage
#

@median panther can you give me more details?

median panther
#

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

distant sage
#

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?

median panther
#

No, I'm testing webhook using ngrok. And creating payment intetnt using stripe cli.

distant sage
#

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

median panther
#

So for own account it's working. It won't work for connected account?

distant sage
#

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

median panther
#

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)
median panther
distant sage
#

yes

median panther
#

Okay, Thank you for ur help and saving time.