#BrianC-testmode-connect
1 messages Β· Page 1 of 1 (latest)
We're not even seeing that a webhook is being sent. I'll go to the transaction and check though'
Can you clarify the first question? Why do we need two variations of test modes?
The "error" is "pending webhook response" in the transaction of the "real"coneectd aop in test mode
I can't really speak to the "why" of the problem. Mostly it comes from a product team that likely did user-outreach to figure out if there was a use-case for allowing both test and live transactions on a live-mode Connect account
It sounds like you're not sending back a 2XX response which could mean a lot of things
OK. But what are the use-case scenarios? It used to work with Connect accounts being created in test mode and then webhooks to those apps would be thorugh the test master account. It looks like now you can also have a live master and connected account, use the live connected account butsend charges in test mode and it will show up in the live connect acocunt's transactions when the connect account is switched to test mode.
Veruy confusing as now we are getting webhooks sent to the ether.
Which is it? Which do we use/
?
We can't even figure out where it is being sent? Oour webhook shows no activity
Where is the webhook for this session being sent? cs_test_a1DeaUjXpjZUQYICRn6ZCFlQqo2rdC4WjhYSVmWT6s3iywHUp829zTFO6a
Hello, the server is getting pretty busy so I am taking over for two-shoes here.
Checking in to that Checkout Session specifically. Is your other main question is about why your connect webhook is getting test events in live mode?
No. Please read the question again. It's about why there are two "test modes" and why to use each scenario. It;'s wastning a lot of deve time on this end since we can't get webhook responses from our connected accounts to work in test mode. Which scenario shoud we be usiung?
I'm not sure what you mean by two test modes. Can you clarify where you are seeing each test mode here?
There are two sceanrios for testing connecged accounts.
1: create a "test" connexted acount while in test mode of the master account
2: using a "real" connected account in a real master account, send transactiosn in test mode from checkout and they wil be listed in the "test mode" transactiuons of a real connected account
Also that event should have gone to this webhook endpoint, it looks like it is the only webhook endpoint that you have that subscribes to Checkout Session events https://dashboard.stripe.com/webhooks/we_1Kr5gAKTXOeT140n8XiDEWF6
OK. That helps.
You can create and connect an account either way to test in test mode. They are the same test mode, the difference is whether those accounts would also be connected in live mode
If they are the same, why don't the connected accounts which were created attched tot he real master account show up in test mode while in test mode for the real master account? and why? What is the use case for each of these?
Where did you find this information? In case it gets confusing again how can we trqace this from the actual transaction
Do you have an example ID of an account that is attached to your master account that is now showing up in test mode?
Correct, "is not"
acct_1KZQ32QSv5bgTx2G
I got that on an internal page about your account. You can check your version of the page at https://dashboard.stripe.com/webhooks or https://dashboard.stripe.com/test/webhooks
Thank you for the account ID, checking in to it
And what is your master account ID?
What I meant is where can check to see where (which endpoint(s)) a particular webhook transaction was sent - by the session id
I actually don't know if there is a good way to look that up in the Dashboard. In your case it was easier to look at each webhook endpoint and see what events each was listening for
You can use the list Events API call filtered by type, check the ID of the object to see if it is the one you want, and then check in your dashboard to see deliver logs https://dashboard.stripe.com/test/events
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You folks need to add that. We still are not receiving the webhooks we are expecting. Just tested it again. We have no easy way to now where the webhook request is being sent.
Can you send me the ID of this newest Checkout Session?
cs_test_a1wuTl7zwOn5syWZnU1A64tq2A8OnOKAycr1NZcFnbvG1DKmAY52NCvyRK
Checking in to it...
i just went thourgh all of the logs for all endpoints test and live and cannot find that transacation π
Okay, I see why you are not getting the event for this. Checkout-wise only the checkout.session.completed event is being sent out for these sessions and your webhook endpoint does not listen for them.
"enabled_events": [ "checkout.session.async_payment_failed", "checkout.session.async_payment_succeeded", "checkout.session.completed", "checkout.session.expired", "payment_intent.canceled", "payment_intent.created", "payment_intent.succeeded", "payment_intent.payment_failed", "payment_intent.amount_capturable_updated", "payment_intent.partially_funded", "payment_intent.processing", "payment_intent.requires_action"
Trying to think of how you can check for these events as they are happening on Express accounts.
Is there a reason you are doing direct charges on express accounts? Typically we reccommend against direct charges with Express as they can make refunds and other flows difficult
That doesn't have anything to do with what we are talking about though. There is a reason and it is trusted clients. which Express connect account are you referring to specifically?
I need to figure out this mess of test accounts and test our webhooks I';ve psnet days on this now.
Correct, not directly related to the webhook issue. Just thought it was worth bringing up to avoid you potential pain in the future.
Interesting, I do see that that endpoint was updated to include that event type shortly before the event was sent out
Checking in to what may have happened here
Two endpoints are set up to receive checkout.session.complered
neither endpoint shows that transaction in the logs
wehre did it go?
Ah okay. So this is a place where you will want to connect the accounts in test mode as well. If the accounts are only connected in Live mode, then test events will only go to the Live mode Connect endpoints on the Platform. If you connect in Test mode, the test mode events will start going to the platforms Test Connect endpoints
That is the question I started with. There are two scenarios. Extremely confusing and seeminglh not documented. Where did the request I last sent you go?
Whcih endpoiuunt?
That area of our documentation can definitely be clearer on how the connections affect the events
Lol me neither despite my typos
As far as I can tell, the event for that session did not go to any of your webhook endpoints
where did the request go? whcih endpoint? I need to know that
Exactly. Where did it go then? and why?
The account you created the Session on is only connected to your platform in Live mode and the Platform only has Test mode endpoints that are subscribed to that event type
You either need a live mode endpoint on the platform account, that will receive live and test events from accounts connected to it in live mode
Mak3s no sense whatsoever. What is the point of test mode for the connecte live endpoint?
Or you need to connect the platform and connected account in Test mode, thus enabling the test events to be received by the test mode endpoints
It is part of supporting legacy behavior in our system
What are the scenarios? use cases?
We do document the fact that test events can go to the live endpoint and that events should be checked for the livemode value. Though again we agree that that section can be clearer and are working on it https://stripe.com/docs/connect/webhooks#connect-webhooks
Ah!! legacy support. Not clear at all. I have been using this API for years and all of a sudden test mode showed up in connectd ive accounts.
Why on eath would one send a test event to a live endpoint?
Are you telling me that the test events we sent today (the one we sent you) went to a live endpoint?
When Connect was first released there were only live mode connections so this was part of allowing test mode connection for then.
What are the use cases for each scenario?
These events did not go to any live mode endpoints. They would have if those live mode endpoints were subscribed to these event types though.
We need to be this crystal clear.
dangerous. and irresponsible π
So test charges sent to the connect account (live connect account) are listed in test mode but the webhooks are sent to live endpoints, not test endpoints?
What is the purpose of that?
Basically, the scenarios are what endpoints you want to test these events on. In your scenario, you probably just want to connect in test mode, that way only test mode events are sent to the platform and they only go to the test mode endpoints
Is this clearly laid out somehwere where we can study it? You guys bascially created a mine field. Sorry. Np other way to sayt it. So incredibley easy to corrupt a live DB and post test purchaes to reports as live purchases.
terrible
We need someplace to really study this and know what the consequences are for each scenario
in order to not create a disaster
Also. Silently failining endpoints with no way to trace it. really?
You guys styarted out so strong. turning into spaghetti :).
This behavior boils down to:
- If you have a live mode connection, the test and live events will go to the live Connect endpoints on the platform account.
- If there is a test mode connection, the test mode events go to the test Connect endpoints on the platform.
- If there is a test mode connection and a live mode connection, both of the above apply. Test and live events go to the live Connect endpoints and Test events go to the test Connect endpoints.
Where does Live master account/live connect acount sending purchases using test keys fall into? It seems to be a hybrid of master/test connect/live and test)?
In that case, because you have a live connection. We are in scenario one that I laid out
If you have a live mode connection, the test and live events will go to the live Connect endpoints on the platform account.
I'm trying to see how you can get greater visibility in to these events given your Express setup.
it seems like using hte test api keys automatically recognizes test mode of the master account AND test mode of the connect account but the webhook goes to the live webhooks. Correct?
Correct, test API keys will generate objects/events in test mode. Because of your live mode connection, the test events will go to the live webhook endpoints.
Can you clarify?
Also just as a warning, I have to step out soon but my colleague Snufkin will be taking over to help you out with this
Clarify what?
Hi π
If we are using a test key aren't we in test mode for the master account?
If we are using a test key aren't we in test mode for the master account?
If the platform is using Test API keys you will only receive test mode events from the connected accounts
but the webhooks events are sent to live endpoints not test endpoints. That is what we discovered today
correct?
the test mode events are sent to the live endpoints in that scenario
Live mode endpoints receive only live mode events from your account but both live and test from Connect Accounts
Do you have an event ID that was delivered where you did not expect?
Please read the thread.
About to step out but basically they have only have a live mode connection to the account they are creating Checkout Sessions on but only have test mode endpoints on their platform. So they have Checkout events like this one evt_1L355oQSv5bgTx2Gi8A8QVVq but they aren't going to any endpoints.
failing silently as we have no way to know which endpoint the request was sent toi
It wasn't sent to any
The error is "waiting for webhook to respond" and no way to know what endpoint (or non-endpont). So no way to know it wasn't sent to any.
That's not the issue though. It's the confusing test modes and the possbility of test transactiosn being postd to live endpoints/ We are getting cklarity now on how this is set up and how the legacy testing is interferring with our dev
Okay. well for the event posted the issue appears to be that livemode:true was set but the only live mode Connect webhook endpoint you. have enabled doesn't listen for checkout.expired (https://artisttools.artistshare.com/webhooks/stripewebhookprocessor).
Just to close that loop
I don't know what that event is. not showing up in a search on our DB
It's associated with this Express account: acct_1KZQ32QSv5bgTx2G
Either way, the takeawy from that is that test charges using the test API key - prebuilt checkout in test mode- show up on test mode of the connected acocunt but the webhook events are sent to the live endpoints. We do not have any live endpoints that receive those events currently (luckily) so it silently failed, Is this correct?
The event @spring leaf provided was a live event. However, both Live & Test events from Connect Accounts will hit your Live mode Connect Endpoint. For that reason we recommend applying a filter to only take action on events where event.livemode = true
When you say Live Event, what exactluy does that mean? We used test API keys and the checklout clearly said testmode
Where can we see a clear breakdown of the differences between the legacy test mode and the currecnt one that seems to send test (or all ) events to live endpoints? This is what is potentially disastrous for us.
Have been developing with this API for manhy years.
Totalluy confusing now.
usse cases for each or at least a place where we can see the potential caveats
Starting with
Either way, the takeawy from that is that test charges using the test API key - prebuilt checkout in test mode- show up on test mode of the connected acocunt but the webhook events are sent to the live endpoints. We do not have any live endpoints that receive those events currently (luckily) so it silently failed, Is this correct?
Is this correct?
If the Checkout Session occurs on a Connect Account and you are using Test API keys, that event will still hit the live webhook endpoint for the platform
If you are listening for them
Where is the cdocumentation for this
?
Also, do you happen to know when this changed or was implemented?
Which API version
?
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.
Yes, I see that. Thanks.
Can you answer the live mode question? Why are charges send using test api key and listed as test mode with pre-built chekout sent as live mode?
I was searching our API upgrade docs but didn't see anything webhook related
Can you share a charge made with the test api key? The only event I saw was made with a live key
cs_test_a1wuTl7zwOn5syWZnU1A64tq2A8OnOKAycr1NZcFnbvG1DKmAY52NCvyRK
Okay so the checkout session you shared above is made with the test API key clearly and generates this payment intent(pi_3L35eiQSv5bgTx2G1ulkWxoi). livemode: false. So far so good
Whch endpoint did this go to?
Which in turn generates a charge (ch_3L35eiQSv5bgTx2G1KQUQWGJ) which also has livemode: false
These are API requests to Stripe. Are you looking for any events in particular?
Where was the webhook sent for thie session? which endpoint?
It's not showing up anywhere in our logs that I can see.
It should be going to a test url endpint according to the docs
Yup I'm looking for it
I'm seeing failed webhook deliveries to https://027c-97-90-153-248.ngrok.io on the Express Account
That endpoint is returning http_service_unavailable
But that error is not showing up . in the dashboard it says A Checkout Session was completed. no error
are you sure about that?
Where are you seeing that error?
The session was completed just fine. It's only the delivery of the event that is failing
It's on the Express Account (acct_1KZQ32QSv5bgTx2G)
Here's the full request body:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="author" content="ngrok">
<meta name="description" content="ngrok is the fastest way to put anything on the internet with a single command.">
<meta name="robots" content="noindex, nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link id="style" rel="stylesheet" href="https://cdn.ngrok.com/static/css/error.css">
<noscript>ngrok gateway error
The server returned an invalid or incomplete HTTP response. (ERR_NGROK_3004)</noscript>
<script id="script" src="https://cdn.ngrok.com/static/js/error.js" type="text/javascript"></script>
</head>
<body id="ngrok">
<div id="root" data-payload="eyJjZG5CYXNlIjoiaHR0cHM6Ly9jZG4ubmdyb2suY29tLyIsImNvZGUiOiIzMDA0IiwibWVzc2FnZSI6Im5ncm9rIGdhdGV3YXkgZXJyb3JcblRoZSBzZXJ2ZXIgcmV0dXJuZWQgYW4gaW52YWxpZCBvciBpbmNvbXBsZXRlIEhUVFAgcmVzcG9uc2UuIiwidGl0bGUiOiJTZXJ2aWNlIFVuYXZhaWxhYmxlIn0="></div>
</body>
</html>
Oh, here's the dashboard link for the event: https://dashboard.stripe.com/test/events/evt_1L350GQSv5bgTx2G0RYpPigJ
In the dashboard it shows it was competed with a 200 OK response
look at the transaction
That is what I said. The transaction was fine. This is for delivery of the webhook event
I am getting this for that link 'No such notification: 'evt_1L350GQSv5bgTx2G0RYpPigJ'
Where is the event?
That is probably because it only exists on the Connect Account
So where would I be able to see it? Or even know about it?
https://dashboard.stripe.com/acct_1KZQ32QSv5bgTx2G/test/events
Let me know what you see there
List of events but when search it says could not load the connected account. Which connected account exacatly are we dealing with here?
acct_1KZQ32QSv5bgTx2G ?
Yup. Unfortunately I'm not seeing a great way to filter by ID in the Connect page
Your best option is to change the list display to show the account ID instead of the name and use your browser's search to find the account
I'm logged into that express aacount . are you viewing test mode or ;ive mode events?
Test mode since that's how the checkout session was created
I have no way to see that error or to even know about it that I can see.
This is a problem.
I cna filter by failed. What is the date/time stempl on it?
I don't see any events for today using the filter pending/failed
HJmm Ok. There has to be a better way. How will we be able to know when the webhook response fails?
How will we know about these errors when we go to production?
Or even for testing. We've hit a wall here
Hmmm.... it should show up on the Developers pane if the webhook is hosted (not simply forwarded using 'stripe listen')
which, I presume, is what the ngrok tunnel is for
What you should see is similar to what you currently see for your golaunchmusic.com/webhooks/stripeaccept endpoint. Where the delivery errors are clearly logged
Except
What I am seeing isn't recorded as a failure
Right. but its not working that way
and it's realy hard to debug
impossible to actually
Still can't find that event
I'm seeing 503 errors from ngrok which is telling Stripe this endpoint is disabled.
Those should still be logged since anything other than a 200 is a failure
Ok. but I'm not seeng that. that is te problem
I'm legitimately confused so I'm asking a colleague
Okay so the error isn't showing on your end because the endpoint was deleted and re-created after this event fired
In order to see this event and the failed webhook deliveries you would need to Login As the account in question
I ma logged in as the account in question and it is not there
The endpoint was updated (I 'm gussing that is the same as deleted) but the event I sent you was sent after the update
I'll look into that thoguh
You didn't send me an event
I don't think this is tru
That checkout session triggers many events
OK. Whatever happened π
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Try this link
We are tlaking about hte same event\
that worked. I can see that now.
But how would I be aware that the webhook request failed in the first place without having to dig for an event. Plus, how would I get there from the dashboard?
It
It's taken a few hours on a chat with you folks just ot get to this point π
I'm still at a loss on how to debug this process. Would it be possible to set up an email notification for these specific to this express account?
π im hopping in since snufkin has to head out - just give me a minute to catch up
Juts to confirm - the issue here is just that you deleted the webhook endpoint, which (as expected) caused all the events that were previously deleted to not be retried and you're wondering how to recover from that?
no. sorry. it's alot more than that. been at this now for a few hours. can;t really start over again. thanks for your help though.