web hook error

398 views
Skip to first unread message

Igor Shmukler

unread,
Jun 3, 2021, 12:02:46 PM6/3/21
to Stripe API Discussion
Hello,

I am adding a webhook to my Stripe setup to get notifications whenever
customers' subscriptions are paid.

Used the dashboard to add my webhook endpoint and a bunch of events
from charge and subscription_schedule "namespaces" like
`charge.succeeded` and `subscription_schedule.completed` etc.

When I am trying to test this new webhook by sending a test event to
the webhook endpoint, I get an error message.

Test webhook error: 500
Connection to remote host denied (please contact sup...@stripe.com)

What am I doing wrong?

Thank you.

Remi J.

unread,
Jun 3, 2021, 12:43:25 PM6/3/21
to Stripe API Discussion
Hey Igor,

This specific error can happen for a few reasons such as setting some IP address that is not accessible as your webhook URL or having an invalid TLS certificate while passing an HTTPS url. For the former, you'd want to use Stripe CLI (https://stripe.com/docs/stripe-cli) to debug webhooks locally. For the latter, you'll want to make sure you have a valid TLS certificate which you can confirm with https://www.ssllabs.com/ssltest/analyze.html or switch to an HTTP url in Test mode.

Otherwise, it's a bit tricky to debug this without more specific details that you likely shouldn't share over a public mailing list. In that case, I'd recommend contacting our support team and they can help you debug this: https://support.stripe.com/contact/email

Best,
Remi

--
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss...@lists.stripe.com.

Igor Shmukler

unread,
Jun 7, 2021, 7:48:50 PM6/7/21
to Stripe API Discussion
I am still unable to move past 500 in the Stripe dashboard. When I
post FAILING events from the Stripe dashboard with curl and/postman,
there is no problem. I get OK back.

bash-3.2$ curl --location --request POST
'https://....com/appstore/api/public/webhook/stripe/charge' --header
'Accept: application/json' --header 'Content-Type: application/json'
--data-raw '{
"object": {
"id": "ch_1IzFMxJMVinO0P7Wryd7ueOD",
"object": "charge",
"amount": 300,
"amount_captured": 300,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_1IzFMxJMVinO0P7WVhvC0rvp",
...
}'

HTTP/2 200
date: Mon, 07 Jun 2021 18:51:48 GMT
content-type: text/plain; charset=utf-8
content-length: 2
x-dns-prefetch-control: off
x-frame-options: SAMEORIGIN
strict-transport-security: max-age=15552000; includeSubDomains
x-download-options: noopen
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
cache-control: no-cache
uber-trace-id: 81b81f2cb2a443e7:81b81f2cb2a443e7:0:0
...
etag: W/"2-nOO9QiTIwXgNtWtBJezz8kv3SLc"
vary: Accept-Encoding

I tried contacting support. Did not help to resolve my issue.

Igor Shmukler

unread,
Jun 7, 2021, 7:48:53 PM6/7/21
to Stripe API Discussion
Wanted to add that when I test using your CLI utilities, resending an
existing event and listening for it, there are no errors.
$ stripe events resend evt_...
$ stripe listen --forward-to localhost...
--> charge.succeeded [evt_...]
<-- [200] POST http://....

There is no problem. Nor there is a problem when I sent the same
payload to the public URL of the webhook endpoint, with postman or
curl.

Remi J.

unread,
Jun 7, 2021, 8:07:02 PM6/7/21
to Stripe API Discussion
Hey Igor,

I could be many things and it's not something we can debug easily over a public mailing list. I'd recommend reaching out to our support team directly instead: https://support.stripe.com/contact/email

Best,
Remi
Reply all
Reply to author
Forward
0 new messages