#rnash

1 messages ยท Page 1 of 1 (latest)

foggy hollowBOT
nimble nacelle
#

I'm gonna add more context to this

#

"I have setup the stripe CLI tool on my mac. I have my application running and I've pointed the CLI at it via stripe listen. When I fire events without passing a --stripe-account parameter, it works great. However no connect events are seen at all."

#

I've tried stripe listen --forward-connect-to localhost:7013/webhooks/stripe

#

and stripe listen --forward-to https://localhost:7013/webhooks/stripe

#

neither one of them shows an event if I run:
stripe trigger --stripe-account acct_########## payment_intent.created

wet tulip
#

Hello again! ๐Ÿ‘‹

Let me dig into this a bit more and see if someone is available to deep-dive on it with me

#

Before that though, can you elaborate a bit more? It would be helpful if I had a series of steps that you would like to take in order to do a thing. It sounds like you want the be able to set up the CLI to forward events that happen on your connect account, and you're trying to do that via the above methods, but I just want to be sure I fully understand

nimble nacelle
#

ok sounds good

#

yes, that's exactly right

#

I need to setup a webhook that captures events for my connect accounts in order to log various things and for my application to be able to do things like see when a client has a payout or receives a payment

#

and I'm not able to see those events at this point

#

my understanding from talking to you all yesterday and reading the documentation is that I should only need to run:
stripe listen --forward-to localhost:7013/webhooks/stripe
and then in a different terminal fire off events like:
stripe trigger --stripe-account acct_########## payment_intent.created
and they will show up in the terminal log and my code will be hit

#

that's not what's happening though

#

I see this:
stripe trigger --stripe-account acct_######## payment_intent.created Setting up fixture for: payment_intent Running fixture for: payment_intent Trigger succeeded! Check dashboard for event details.
after running the stripe trigger command and never see anything in the log or in my code

wet tulip
#

Alright, awesome! Thanks for all the detail. Let me dig a bit more on this and circle back

nimble nacelle
#

ok sure thing

wet tulip
#

actually, sorry for such a back-and-forth: what type of connect account are you onboarding?

#

Express, standard, custom?

#

I want to test some things on my end

nimble nacelle
#

good question

#

I didn't set these up

#

how do I check?

#

nvm

#

I see it

#

they are standard

wet tulip
#

Okay, thanks. Can you run the same commands you mentioned in 2 separate terminals:
stripe listen --forward-connect-to localhost:7013/webhooks/stripe
stripe listen --forward-to https://localhost:7013/webhooks/stripe
And then navigate to one of the connect accounts Stripe dashboard (see screenshot) and do a thing like make a test payment? When you do, are you seeing any indication that the CLI listener is picking that event up?

nimble nacelle
#

ok, I followed those steps

#

nothing

#

no event in the log of either terminal window

#

I should mention that if I manually trigger an event from the CLI using the --stripe-account param, I see it in the dashboard of my connect account

silver hound
#

If you run stripe listen without the forwarding, do you see any events?

nimble nacelle
#

no

#

unless I remove the --stripe-account param

#

then I see it

silver hound
#

with stripe listen in one terminal and stripe trigger --stripe-account acct_########## payment_intent.created in another, you should see the event logged in the terminal output

#

Can you try using stripe listen --latest and see if that makes a difference?

nimble nacelle
#

no

#

still nothing

#

is it possible my platform account and the connect account I'm testing with aren't setup properly?

silver hound
#

Let me test what it does with an invalid connected account for me...

#
"error": {
    "code": "account_invalid",
...
#

when i try to trigger the event

nimble nacelle
#

i think I just figured it out

silver hound
#

oh?

nimble nacelle
#

so I have three connect accounts (atm)

#

I see those three when not in test mode

#

but when in test mode, I don't see them

#

however if I navigate to them and then turn on test mode, then I'm able to see the various test payments and things we've been making

#

but I don't see them in my list of connect accounts when in my platform account with test mode on

#

so I tried using the acct_# of a test connect account I created a while back (when I didn't know what I was doing)

#

and that worked

#

I see the event

#

so why would the legit connect account not show up in test?

silver hound
#

Ah, that might be the way the real accounts were presumably connect via oauth -- yes a dedicated test mode account is going to work better here

nimble nacelle
#

but I need to be able to test with these specific clients

#

and their test accounts

silver hound
#

One last test to see if any events arrive but are dismissed, can you try:
stripe listen --log-level=debug

nimble nacelle
#

not for those accounts

#

no

#

so those accounts were setup by my clients (who are not very tech savvy)

#

it took weeks to get them to finally set them up

#

and they know how to log in and turn on test mode

#

so I really need to be able to test with those specific accounts

#

shouldn't an account created in live, linked to my platform account show up and be linked in test mode as well?

#

..seems like a bit of an issue if not

silver hound
#

Yea that's the expectation, that you're able to refer to live standard accounts in test mode too

#

With listen running, can you make a test mode API request using something other than the CLI? eg, a curl request

#

I'm trying to narrow this down, and working on how to test this myself

nimble nacelle
#

sure

#

I've tried that a few time

#

times*

#

either through the Stripe library in my .Net application or through Postman

#

i see an event for the appilcation fee coming over to my platform account

#

but nothing else

silver hound
#

This is odd. I want to get to a reproduction but need to have some accounts set up for it.

#

Do you have a test mode connect endpoint configured in the dashboard?

nimble nacelle
#

no not yet

#

i was working on setting that up locally when I found this issue

#

and I haven't pushed out to my test server yet or configured the endpoint

nimble nacelle
#

Do you need me to set something up?

silver hound
#

I don't think so, but let me continue to poke at this for a bit -- I might ask you to write in to support so I can investigate and file a bug report if needed

nimble nacelle
#

ok sounds good

silver hound
#

Alright, i've been able to reproduce what you're describing, same live standard connected account set up

#

Now to figure out why

nimble nacelle
#

ok good deal

#

baby steps ๐Ÿ™‚

silver hound
#

Can you share one of the live mode connected account IDs so i can confirm something please?

nimble nacelle
#

sure

silver hound
#

I think I understand this now

nimble nacelle
#

those are shareable, right? like I have to put them in my js file anyway... right?

silver hound
#

yes, acct_123 ids are safe to share. all IDs are.

nimble nacelle
#

acct_1LpdLeB8UsuvgOmT

#

that's one

silver hound
#

just no sk_123 secret keys, or client secrets

#

thanks

#

Ok I am waiting on something for confirm this test, but I am reasonably sure about the situation

#

Briefly, this is an edge case due to the way live mode standard accounts work with connect and test mode

nimble nacelle
#

will it require a ticket and/or bug fix on the stripe side?

silver hound
#

No, there are no changes required here but to have this work on your side you'll need to have those customers/clients connect their accounts to your test mode platform

#

ie, have them complete the same oauth flow as before, but using your test mode client application id ca_123

#

I am waiting for this to test and confirm, but like I said I'm pretty sure

nimble nacelle
#

man

#

that's going to take some jumping through hoops

#

and in the end it will have a completely different acct_#, correct?

#

will they be able to login the account they know and use, flip on test mode and see everything

#

or will they have a new account to login to?

silver hound
#

No, it'll be the same account id

#

Yep, same account, they just need to approve your test mode application to connect

#

No new account

#

If they're logged in already, it should be ~1 click

nimble nacelle
#

ah

#

ook

silver hound
#

You may want to just make sure to test your test mode oauth flow before asking them to do that

nimble nacelle
#

how do I generate that link?

#

Create button on the connect page?

#

in test mode

silver hound
#

There's a "test oauth" button that can produce the link

#

I will say, even without doing this you should already be able to get events from these accounts, just not quite where you expect them

#

They'll be sent to a live mode connect endpoint with livemode=false in the payload (confusing I know)

#

But this doesn't work with the CLI

#

So you've got a couple of options

nimble nacelle
#

hmm.. so if I put a simple webhook endpoint on my test server and just log everything to a file or the console or something, I should see the events

#

?

silver hound
#

Yes, but it needs to be configured in the live section of the dashboard, and you should filter to just livemode=false events for this purpose

#

Apologies for the confusion here, this is the first time i've considered this edge case + the CLI listen. There's no bug, exactly, but I'm going to report this for feedback to try to improve the CLI experience.

nimble nacelle
#

i see

#

luckily I was able to walkthrough my user

#

that was a very easy process since their login was saved

#

so i'm going to test that now

#

hooray!

#

that worked

silver hound
#

Nice!

#

Glad we got you sorted out ๐Ÿ™‚

#

Thanks for your patience while i figured this out and tested

nimble nacelle
#

thanks so much for your and everyone else's help