#rnash-connect-webhooks

1 messages · Page 1 of 1 (latest)

tepid temple
marsh lintel
#

as far as i know, it's a different webhook style

#

you can click the checkbox when you make the webhook

prisma garnet
#

what about when using the cli for testing locally?

#

I started the listener like so: stripe listen --forward-connect-to https://localhost:{PORT}/webhook

#

and when I do that, my endpoint doesn't get hit at all

tepid temple
#

Do you have an example event that you're expecting to be sent to your connect endpoint that isn't working?

prisma garnet
#

charge.succeeded

#

charge.failed

tepid temple
#

Sorry let me clarify - do you have an event ID? Something like evt_xxx?

prisma garnet
#

ah

#

evt_3JtdeUL8ajwDdEQr00192i6s

tepid temple
#

Can you try this out (not the added --live at the end)
stripe listen --forward-connect-to https://localhost/%7BPORT%7D/webhook --live

prisma garnet
tepid temple
#

Yes, but try adding --live to the end and then triggering a new test webhook event on the connect account

prisma garnet
#

ah

#

unfortunately that didn't seem to change anything

#

in regards to the endpoint getting hit

tepid temple
#

That's strange - what's the most recent event you tried to listen for?

prisma garnet
#

stripe trigger --stripe-account acct_XXXXXXXXXX charge.succeeded

#

I'm using ACH on the connect account side for charges

#

because that has a ~5 day pending period, I need to know when it's succeeded

tepid temple
#

Can you do me a favor and re-run the stripe listen command with the --live flag, and try the trigger commands again?

prisma garnet
#

I've done that

tepid temple
#

That's so strange - from what I see on my end this should be working. What version of the CLI are you using?

prisma garnet
#

homebrew on macOS

tepid temple
#

What do you see when you run stripe -v

prisma garnet
#

stripe version 1.7.6

tepid temple
#

Can you add --log-level debug to your listen command? That should give us some more clues about what specifically is failling

prisma garnet
#

ok

#

on it

#

[Mon, 08 Nov 2021 14:18:15 CST] DEBUG proxy.Proxy.processWebhookEvent: Processing webhook event webhook_converesation_id=1636402695-wc_uagK2iegsIcKex webhook_id=1636402695-wh_ImyqEaDQayTCOA
[Mon, 08 Nov 2021 14:18:15 CST] DEBUG proxy.Proxy.filterWebhookEvent: Received event with non-default API version, ignoring api_version=2020-08-27

#

there's some more stuff there

#

not sure what all you would like to see

#

looks like the webhook attempt isnt being fired

#

evt_1JteOvL8ajwDdEQrUK4MLv5Z

#

^that event is actually from my project code

#

and doesn't seem to have fired off any webhook events

warm acorn
#

Thanks, that is helpful

prisma garnet
#

any idea what I'm missing?

warm acorn
#

Sorry, trying to figure that out

#

What library is your backend using?

prisma garnet
#

.net

warm acorn
#

What version of that library?

prisma garnet
#

39.73.0

tepid temple
#

Can you share more of the output from the stripe listen command with us? Also, just to eliminate some possibilities, do you see it come through successfully when you don't forward it (removing forward-connect-to)?

prisma garnet
#

i do see it come through correctly without the connect-to

tepid temple
#

Interesting - so it's the --forward-connect-to that's the problem. Is what you sent over the output when it's not working, or when it is working?

prisma garnet
#

when it's not working

#

i did push my code up to my test environment and try registering an endpoint that way

#

and using the test button in the dashboard seems to work, but as soon as I send off a test charge, i get nothing

tepid temple
#

When you registered your endpoint did you do so in live mode or test mode? You should be registering a live webhook endopint, since the connected account in question is only connected to the platform in live mode and will only send it's webhook events to a livemode connect endpoint

prisma garnet
#

hmm

#

i can't test in live mode though

tepid temple
#

If you want to be able to use a testmode connect webhook endpoint for this connect account you also need to connect it to your platform in test mode then.

prisma garnet
#

hmm.. I'm not sure I understand

#

how am I able to create users and charges through the connect account in test if it's not already connected in test

#

?

tepid temple
#

I know it's all a bit confusing - I need to leave so @gilded flower is going to take over, but let me leave some detail that will hopefully clear this up:

  • Accounts can be connected to a platform in Live and/or Test mode
  • When an Account is connected in Test mode, you can only make test requests on it's behalf and the events that occur on that account are only sent to your testmode connect webhooks
  • When an Account is connected in Live mode, you can make both test and live mode requests for it. These events will by sent to your livemode connect webhooks (which will receive both live and test mode connect events since you can do bothen when connected in live mode)
gilded flower
#

@prisma garnet

but as soon as I send off a test charge, i get nothing
what happens? an API request is made? your code runs? there's an error?

prisma garnet
#

my code runs, the charge is created on the connect account side and the application fee shows up on the platform account side

#

however no webhook fires

gilded flower
#

send me an Event ID that you see in your Dashboard but never got your webhook handler triggered for it?

prisma garnet
#

sure

#

evt_1Jtf8PL8ajwDdEQret0XR1kY

#

evt_1Jtf8JL8ajwDdEQrzFo4JuAV

#

probably should have reversed that order

gilded flower
#

thanks looking

#

ok so taking evt_1Jtf8PL8ajwDdEQret0XR1kY for example

#

from what I can see from my end is that it was sent to your Stripe CLI listener

#

looking at something else

#

hmm I'm wondering if you've instantiated Stripe CLI as the Connect account and not as the Platform account (referring to the stripe login part)

prisma garnet
#

for those two events, I was not using the CLI

#

those are from my test server

#

so not local

#

so I fired off a test charge via the Stripe .Net library in my code (pointing to test via the keys)

#

after having registered the endpoint via the webhook dashboard

gilded flower
#

for those two events, I was not using the CLI
sure it doesn't matter if the event was created from Stripe CLI or not, if you have stripe listen going on on a machine, it will trigger even if the event results from an API request

after having registered the endpoint via the webhook dashboard
ok great, can you send me the WebhookEndpoint ID for that? it would be in the detail page of that webhook endpoint

#

in the Dashboard

prisma garnet
gilded flower
#

fair, so if you can get me the Webhook Endpoint ID (it would be something like we_123) and I can look

prisma garnet
#

we_1JteeMLXrJfhQyEps6fbfmM5

gilded flower
#

thanks, checking

deep zinc
#

Hello! I'm taking over for @gilded flower, let me get caught up...

prisma garnet
#

ok thanks

deep zinc
#

Okay, so you expected evt_1Jtf8PL8ajwDdEQret0XR1kY which is a charge.succeeded to be sent to webhook endpoint we_1JteeMLXrJfhQyEps6fbfmM5 but it wasn't, right?

prisma garnet
#

yes

deep zinc
#

That webhook endpoint is a test mode Connect webhook endpoint, meaning it will only get test mode events from accounts connected to your platform in test mode. The account where the charge.succeeded event came from is connected to your platform in live mode only, not test mode, which is why it wasn't delivered.

prisma garnet
#

ok

#

that makes sense

deep zinc
#

Connect webhook event delivery can be tricky. This might help:

#

The scenario here is in the bottom left corner.

prisma garnet
#

so in order to connect the account in test mode, I just need to setup the account the same way as I did for live, but while that test switch is flipped?

#

wait

#

nevermind

#

is there a trick to setting up the connect account in test or can I do that like I describe above?

deep zinc
#

I don't think there's any particular trick to it. Are you running into an issue?

#

Another question: You should be getting both test and live events sent to your Connect webhook endpoint in live mode; do you really need to get test mode running as well?

prisma garnet
#

ah

prisma garnet
#

Thanks so much for everyone's help

#

I think I have what I need at this point

#

Best Regards!