Support » Plugin: WooCommerce Stripe Payment Gateway » Webhooks delivery error 400

  • Resolved nextnorth

    (@nextnorth)


    Hi
    Hoping someone can help me with this. The site went live a few days ago and we have transacted successfully several times. The orders are going through woocommerce correctly and payment is collected by Stripe. However the events are not being sent through to the Webhook endpoint.

    We have set up the endpoint address in accordance with the instructions in the stripe payment settings in WooCommerce. We are getting a 400 error. Can’t find any help on how to activate or set up this endpoint – I thought it would have been automatically set up on installing the plugin?

    For information, we also have Sumo instalment payments plugin installed (which also seems to be working fine and communicating with Stripe). Up until last week the site was located on a different (test) domain where we did all the sandbox testing.

    Any help or pointers would be gratefully received.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • bizmatebiz

    (@bizmatebiz)

    Can you expand on how you have setup the webhooks? Also can you check the woocommerce logs at
    /wp-admin/admin.php?page=wc-status&tab=logs

    Go to the dropdown and check stripe related logs. Can you see anything wrong there?

    We see several errors related to validation such as

    2020-11-11T03:04:57+00:00 DEBUG
    ====Stripe Version: 4.5.3====
    ====Start Log====
    Incoming webhook failed validation: {
    “id”: “evt_1Hm6…………..a”,

    Thread Starter nextnorth

    (@nextnorth)

    Hi thanks for getting back to me.

    So we installed stripe payment gateway on the test domain and ran test transactions. We moved to the live site on Friday and checked the payment gateway settings which now show:

    “You must add the following webhook endpoint https://mcarthuronline.com/?wc-api=wc_stripe to your Stripe account settings. This will enable you to receive notifications on the charge statuses.”

    So we set up this endpoint in Stripe.

    Checked the logs as you suggested and the failed call to the endpoints are all showing. Not sure what the logs mean – the relevant bit seems to be:

    “livemode”: true,
    “pending_webhooks”: 1,
    “request”: {
    “id”: null,
    “idempotency_key”: null

    My best guess that this is something to do with setting up the plugin originally on the test domain and then moving the site to the live domain – maybe we need to somehow validate the live domain? Can’t find anything in the documentation on Stripe or plugin that refers to this.

    Again any help would be appreciated!

    Thread Starter nextnorth

    (@nextnorth)

    Just to amplify the above, the Stripe documentation talks about setting up an Endpoint and gives some example code to do so (just looked again at it and I wouldn’t know how to do this).

    We just assumed that installing the plugin would generate the Endpoint automatically on the address referenced above – as the instructions imply that we just need to copy that address over to the Stripe Settings.

    bizmatebiz

    (@bizmatebiz)

    hi Nextnorth,

    Just so you know I am not a developer of the plugin nor provide support on their behalf. I am just writing out of interest. I have years of experience and also facing similar problems.

    Can you check again that you have deployed the right webhook secret and run a webhook test from the Stripe dashboard? I had the wrong webhook secret configured and now I can see it working once i place the right value (this is called the signing secret in the dashboard of stripe)

    • This reply was modified 1 year ago by bizmatebiz.
    Thread Starter nextnorth

    (@nextnorth)

    Wow that worked!

    Thanks so much. The webhook secret must have changed when we moved the site onto the live domain.

    Didn’t think to reload this!

    Many thanks for your help.

    bizmatebiz

    (@bizmatebiz)

    Secrets are indeed specific for each webhook . You will have a different secret for each webhook that you add on the Stripe configuration.

    Glad I could help

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Webhooks delivery error 400’ is closed to new replies.