question

jamie avatar image
jamie asked bryanvargas commented

Webhooks not working for me

Back again! This is all in the sandbox so far... all is live on my server, there's no ngrok or anything in between...

I cannot get anywhere with Webhooks... I've tried setting the webhook URL in the Hosted Checkout screen, but successfully checking out doesn't send anything to my URL

I'm also stuck trying to validate my end point in the Webhooks area - where it sends the verification code - it always says "unable to reach callback URL" - but I'm sure my URL is returning 200 OK message on posting anything...

I'm assuming the first part won't work until I've verified my end point is listening using the verification code, I just can't get anywhere with it

Any ideas?

Jamie

Webhooks
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kishoresukumaran avatar image
kishoresukumaran answered

Hello Jamie,

I hope you have been referring to the steps mentioned here.
1. Can I know what is your sandbox developer account id?
2. Can I also know what is your call back URL that you are configuring?

3. What is the app name/UUID for which you are trying to configure the webhook?
NOTE:
Webhooks require a publicly accessible endpoint (localhost alone will not work). You must have a simple web server running on your machine that can receive a webhook setup request and verification code.
If you are having localhost, you can use one of the following tools to expose your localhost for testing:

  • ngrok: Connects your local server to a public endpoint (http://subdomain.ngrok.com)
  • Pagekite: Syncs your local server to a public endpoint (yourname.pagekite.me) (requires Python)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jamie avatar image
jamie answered jamie edited

HI - thanks for the reply - I do have a publicly available endpoint - it's https://www.pcsoweb.com/pcsoauctionapi/Auction

DevID: 9B6P2EVJXYVEC

Appname is PCSOAUCTIONSTEST / 0FW4W7MRPG9JR

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jamie avatar image
jamie answered

Maybe there's some sample C# .net Core webhook code I could look at and get some ideas?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kishoresukumaran avatar image
kishoresukumaran answered

Hi Jamie, I still feel there is some issue with your webhook callback URL server configuration. I tried to do this from my side and I see "Unable to reach the callback URL message" meaning which our POST request is not even reaching your server. Can you get any kind of logs on your server (https://www.pcsoweb.com/pcsoauctionapi/Auction) side to see if you receiving this POST request at all?
Can you also provide a minimum, reproducible example of your server's webhook callback handler? what does your configuration look like?
We do not provide any code snippets or examples to set this up, but searching in our Clover community forum should help you I believe. There have been people asking this same question about this error and they have also posted their code samples.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jamie avatar image
jamie answered

Ohh I am sure it's on my end - I just can't figure out what is wrong... I have a simple API set up to receive a post at my end point and I can get to it from outside my network, so I think it's alive but so far I can't get the verification to happen

I have searched the community but didn't find any answers - but I will search again

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jamie avatar image
jamie answered

OK - so I have decided to get things set up using a mock service - I have verified the endpoint and set to receive all notifications - but when I do a checkout I don't get any notifications to my end point

https://pcsoclovertest.free.beeceptor.com

If I make any changes to my Hosted Checkout - I get a notification of the change - but no payment notifications...

Ideas?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jamie avatar image
jamie answered

Started working this morning and things were working as expected so I'm good for now I think

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kishoresukumaran avatar image
kishoresukumaran answered

Jamie, Glad that you got it working.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jamie avatar image
jamie answered

Hi - back again!

OK so I had set up things to work with beeceptor and so that all worked - now I am trying again to pass the webhook directly to my servers endpoint and the verification still cannot see my endpoint

I can post to my endpoint through reqbin service so I know it's publicly available and working

all I get from the verification "Unable to reach callback URL" but I know for a fact that it's reachable

what can I do to get a better error message?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jamie avatar image
jamie answered

Seems the request is failing somewhere between my Firewall and WAF - I've got my network guys investigating but at least I DO see the traffic from the sandbox... stay tuned!

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community