Stripe webhook
-
Hello,
I received a message from Stripe that there is an issue in webhook delivery. The failing webhook endpoint is https://www.domain.com/?wc-api=wc_stripe.
Please let me know, how to resolve this issue.
-
Hi there 👋
In order to fix this, you would need to log into your Stripe Dashboard and add the following Webhook endpoint
?wc-api=wc_stripeat the end of your domain.It should look like this:
https://www.domain.com/?wc-api=wc_stripeThe following guide will also let you know how to do this:
https://docs.woocommerce.com/document/stripe/#webhooks
I hope that helps 🙂
@gabrielfuentes , We already have this entered in Stripe dashboard
Dashboard screen-
This reply was modified 5 years, 3 months ago by
afsar.
Could you please make sure your webhook endpoint, publishable key, secret key, and webhook secret match on your site (WooCommerce > Settings > Payments > Stripe > Webhook Endpoints) and on the Webhook Setting of your Stripe dashboard?
If that doesn’t help, let’s check if there is an error on the WooCommerce Logs. So please, provide us the following:
- Enable the Stripe error logs by going to WooCommerce > Settings > Payment > Stripe > Logging
- Error log: share a copy of the fatal error log found under WooCommerce > System Status > Logs (if available)
Thanks!
Hi,
The keys in the Stripe dashboard and woocommerce payment settings are same. Strange is that Customer payments are success and is credited in Stripe account. Meanwhile, Stripe is keep sending the warning email
===========================Hi there, We’re contacting you because we’re still having trouble delivering data to a webhook endpoint associated with your ****** account in live mode. Webhooks are used to notify your server about events that happen in your Stripe account, such as a payout completing or an invoice being created. The failing webhook endpoint is https://www.***********/?wc-api=wc_stripe. You or someone on your team has added that endpoint in your Stripe webhook settings, which you can view and edit here: https://dashboard.stripe.com/account/webhooks. Please note that in most cases a failing webhook does not impact your payments or payouts. However, if you use subscriptions we rely on your webhook endpoint to notify you of new invoices. These invoices may be delayed for up to three days if your webhook is unable to successfully receive them. If you use Checkout, you may be handling the <code>checkout.session.completed</code> event as part of your purchase fulfillment process as described here: https://stripe.com/docs/payments/checkout/fulfillment#webhooks. If you do, failure to handle these events may interfere with purchase fulfillment. We’ve attempted to notify the endpoint 20 times since February 18, 2021 at 04:49PM. If this endpoint is important to your application, please try and fix the issue. If you do not need the webhook endpoint you can delete it from your Stripe webhook settings. We will stop sending notifications to your webhook by February 27, 2021 around 04:49PM. Here is the summary of errors we have received when sending you webhooks: * 20 requests had other errors while sending the webhook. You need to return anything between a HTTP 200 to 299 for the webhook to be considered successfully delivered. For more details on the errors, you can find your events page here: https://dashboard.stripe.com/events. You can also always review the history of webhooks and failed request logs right from your dashboard: https://dashboard.stripe.com/events. This email is the last time we'll reach out to you before disabling the webhook. For more in depth information about how to use webhooks, we recommend taking a look at our documentation: https://stripe.com/docs/webhooks. Yours, The Stripe team===========================================
And below is a snippet from debul.log
2021-02-26T01:19:38+00:00 DEBUG ====Stripe Version: 4.7.0==== ====Start Log==== Incoming webhook failed validation: { "id": "evt_1INuRAINPnBdRQrYoj8Rl29S", "object": "event", "api_version": "2020-08-27", "created": 1614061919, "data": { "object": { "id": "ch_************************", "object": "charge", "amount": 100, "amount_captured": 100, "amount_refunded": 0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "txn_****************", "billing_details": { "address": { "city": "****", "country": "**", "line1": "****", "line2": "****", "postal_code": "****", "state": "**" }, "email": "**************", "name": "*******", "phone": "********" }, "calculated_statement_descriptor": "**********", "captured": true, "created": 1614061918, "currency": "usd", "customer": "cus_*************", "description": "******************", "destination": null, "dispute": null, "disputed": false, "failure_code": null, "failure_message": null, "fraud_details": { }, "invoice": null, "livemode": true, "metadata": { "customer_name": "******", "customer_email": "*********", "order_id": "*****", "site_url": "***************" }, "on_behalf_of": null, "order": null, "outcome": { "network_status": "approved_by_network", "reason": null, "risk_level": "normal", "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, "payment_intent": "pi_***************", "payment_method": "src_****************", "payment_method_details": { "card": { "brand": "amex", "checks": { "address_line1_check": "fail", "address_postal_code_check": "fail", "cvc_check": "pass" }, "country": "**", "exp_month": *, "exp_year": ****, "fingerprint": "***************", "funding": "credit", "installments": null, "last4": "****", "network": "amex", "three_d_secure": { "authentication_flow": "challenge", "result": "authenticated", "result_reason": null, "version": "1.0.2" }, "wallet": null }, "type": "card" }, "receipt_email": null, "receipt_number": null, "receipt_url": "https://pay.stripe.com/receipts/acct_************/ch_**************/rcpt_*********", "refunded": false, "refunds": { "object": "list", "data": [ ], "has_more": false, "total_count": 0, "url": "/v1/charges/ch_***************/refunds" }, "review": null, "shipping": null, "source": { "id": "src_********************", "object": "source", "amount": 100, "client_secret": "src_client_secret_*********************", "created": 1614061919, "currency": "usd", "flow": "redirect", "livemode": true, "metadata": { }, "owner": { "address": { "city": "****", "country": "**", "line1": "*****", "line2": "****", "postal_code": "****", "state": "IN" }, "email": "****************", "name": "************", "phone": "*********", "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "redirect": { "failure_reason": null, "return_url": "stripejs://use_stripe_sdk/return_url", "status": "succeeded", "url": "https://hooks.stripe.com/redirect/authenticate/src_*********************?client_secret=src_client_secret_*************" }, "statement_descriptor": null, "status": "consumed", "three_d_secure": { "card": "src_****************************", "exp_month": *, "exp_year": ****, "last4": "****", "country": "**", "brand": "***********", "address_line1_check": "fail", "address_zip_check": "fail", "cvc_check": "pass", "funding": "credit", "fingerprint": "**********", "three_d_secure": "required", "authenticated": true, "customer": null, "name": null, "tokenization_method": null, "dynamic_last4": null }, "type": "three_d_secure", "usage": "single_use" }, "source_transfer": null, "statement_descriptor": "********", "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null } }, "livemode": true, "pending_webhooks": 1, "request": { "id": null, "idempotency_key": "pi_***************-src_*********************" }, "type": "charge.succeeded" } ====End Log====—
Thank YouThat’s strange! By any chance are you using a security plugin like WordFence?
This problem might be caused by a conflict with another plugin. The best way to determine this is to:
- Disable all plugins except for WooCommerce & WooCommerce Stripe Payment Gateway
- Repeat the action that is causing the problem
If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.
Before you start
- First, please make sure you have a good backup in place of your full site and database. Most hosting companies have this included in the subscription, but you could also consider using a service like Jetpack. If something goes wrong, it’s nice to know that you can restore your site.
- Second, I would suggest installing a plugin called Health Check & Troubleshooting. This is a plugin developed by the WordPress community and it allows you to disable plugins without affecting your current site visitors.
Hi @afsar,
We’ve not heard back from you in a while, so I’m marking this thread as resolved. Hopefully, you were able to find a solution to your problem!
If you have further questions, please feel free to open a new topic.
Thanks.
-
This reply was modified 5 years, 3 months ago by
The topic ‘Stripe webhook’ is closed to new replies.