#dishant_webhooks

1 messages · Page 1 of 1 (latest)

fallen wagonBOT
#

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

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

stoic elk
safe carbon
#

sure give me a moment

#

req_EUE5RNAuePiSGm

stoic elk
#

this is a Direct Charge in testmode, if you want to view the payment, you would only be able to find the payment on the connected account and in testmode

safe carbon
#

That is the question that can same account be available for both test & live mode?

#

because this is the webhook triggered of live mode not the test mode that is why in the live mode I am not able to see any payments

stoic elk
#

Today, Live Connect webhook endpoint will receive Test mode events from their connected accounts. This is covered in our documentation : https://docs.stripe.com/connect/webhooks where we say

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.

Learn how to use webhooks with Connect to be notified of Stripe activity.

safe carbon
#

Okay that means
If I do the payment in test mode it will trigger both mode's webhook and vice versa with the live mode
Is that correct?

stoic elk
#

If I do the payment in test mode it will trigger both mode's webhook - yes, correct
if you do the payment in live mode, it will only send the event to your livemode webhook

safe carbon
#

Ohhkk, alright, got it
but what if in test mode I am doing direct charge to my live mode's connected account id. So, in that case should both webhook triggeres live and test or just live?

#

because the req id which I shared to you that has the similar scenarion
the connected account I paid for it is live mode's connected account but I paid via stripe's tes mode keys

stoic elk
#

to be clear, if you use the test API key, then the request is made in test mode. If you use the live API key, then the request is made in livemode

safe carbon
#

Okay got that

#

but what if I am using test mode keys and doing payment for the live mode's connected account then which webhook triggeres?

#

does this make sense ?

stoic elk
safe carbon
#

No that is the main concern I have
Right now I have 2 separate webhooks for test and live mode
for the dev environment I am using test mode's webhook and for prod environment I am using live mode's webhook

But when I created payment intent for test mode with the connected account id of live mode it is triggering the live mode webhook not the test mode

stoic elk
#

are we still referring to req_EUE5RNAuePiSGm?

safe carbon
#

Is it possible that with the test mode public and secret stripe key I can make/create payment intent for live mode's connected account?

safe carbon
#

so that is I want to confirm Can I make the payment to live mode's connected account using test mode stripe keys?

stoic elk
#

yes that's possible. there's actually some complexities here : In this case, that connected account is connected only in Live mode to the platform, the Live and Test events are sent to the platform's Live Connect webhook endpoint.

Only when a connected account is connected in Live and in Test mode to the platform, the Live events are sent to the platform's Live Connect webhook endpoint and the Test events are sent to both the Live and the Test Connect webhook endpoints on the platform.

safe carbon
#

So is it possible that same connected account can be configured under both the environment?

stoic elk
#

yes, a connected account can be connected in both test and live mode

safe carbon
#

Okay then so far I understood that If I am making payment to live mode's connected account and I am using test mode keys then the live mode's webhook endpoint triggers. and If I do the payment to test mode's connected account with the test keys that means it will trigger test as well as live mode's webhook endpoint?
Am I getting it right?

stoic elk
#

If a connected account is connected only in Live mode to the platform, and you use the Test API key to make a request, the Live and Test events are sent to the platform's Live Connect webhook endpoint.
If a connected account is connected in both Live and Test mode to the platform, and you use the Test API key to make a request, the Test events are sent to both the Live and the Test Connect webhook endpoints on the platform.

#

i think the key point here is that you should really be using a connected account that is connected in test mode to perform testing

safe carbon
#

Yes, I will. But there was some misconfiguration has been done from the client side due to that this kind of scenario occurred.

#

earliere I didn't know that the same connected account ID can be present in both live and test mode