{"id":13515,"date":"2026-09-12T16:26:32","date_gmt":"2026-09-12T16:26:32","guid":{"rendered":"https:\/\/webnus.net\/dox\/modern-events-calendar\/?post_type=knowledgebase&#038;p=13515"},"modified":"2026-09-12T16:27:01","modified_gmt":"2026-09-12T16:27:01","slug":"stripe-webhook-setup","status":"publish","type":"knowledgebase","link":"https:\/\/webnus.net\/dox\/modern-events-calendar\/stripe-webhook-setup\/","title":{"rendered":"Stripe Webhook Setup"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this article, we will walk you through configuring Stripe webhooks so MEC completes bookings reliably, even when the customer never returns to your website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Webhooks\"><\/span>Why Webhooks?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, MEC confirms a Stripe booking when the customer is redirected back to your website after payment. If the customer closes the browser tab, loses connection, or the redirect is blocked, the payment succeeds in Stripe, but the booking never completes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With webhooks, Stripe notifies your website directly about successful payments. MEC then confirms the booking on its own, regardless of what the customer&#8217;s browser does. This significantly reduces support requests about &#8220;paid but not booked&#8221; tickets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Webhooks work for both the <strong>Stripe<\/strong> and <strong>Stripe Connect<\/strong> gateways.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Webhooks are optional but strongly recommended. Without a webhook, MEC falls back to the redirect-only behavior.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_%E2%80%93_Copy_Your_Webhook_URL\"><\/span>Step 1 &#8211; Copy Your Webhook URL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Go to <strong>MEC Settings &gt; Booking &gt; Payment Gateways &gt; Stripe<\/strong> and locate the <strong>Webhook Secret<\/strong> field. The helper text below the field displays your site&#8217;s webhook URL:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/yourdomain.com\/wp-json\/mec\/v1\/stripe\/webhook\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Copy this URL, you will paste it into your Stripe dashboard in the next step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_%E2%80%93_Add_the_Endpoint_in_Stripe\"><\/span>Step 2 &#8211; Add the Endpoint in Stripe<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your <a href=\"https:\/\/dashboard.stripe.com\/\" target=\"_blank\" rel=\"noopener\">Stripe dashboard<\/a>.<\/li>\n\n\n\n<li>Navigate to <strong>Developers > Webhooks<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Add endpoint<\/strong>.<\/li>\n\n\n\n<li>Paste the webhook URL you copied in Step 1.<\/li>\n\n\n\n<li>Under <strong>Select events<\/strong>, choose the following event only:\n<ul class=\"wp-block-list\">\n<li><strong>payment_intent.succeeded<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click <strong>Add endpoint<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_%E2%80%93_Copy_the_Signing_Secret\"><\/span>Step 3 &#8211; Copy the Signing Secret<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After the endpoint is created, Stripe displays its <strong>Signing secret<\/strong> (it starts with <code>whsec_<\/code>). Click <strong>Reveal<\/strong> and copy it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_%E2%80%93_Paste_the_Secret_in_MEC\"><\/span>Step 4 &#8211; Paste the Secret in MEC<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Back in <strong>MEC Settings &gt; Booking &gt; Payment Gateways &gt; Stripe<\/strong>, paste the signing secret into the <strong>Webhook Secret<\/strong> field and save the settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s it. MEC now verifies every webhook message using this secret, requests that do not come from your Stripe account are rejected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Stripe_Connect\"><\/span>Stripe Connect<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you use the <strong>Stripe Connect<\/strong> gateway, configure the webhook for your <strong>platform account<\/strong> the same way:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>The webhook URL pattern is identical (<code>\/wp-json\/mec\/v1\/stripe\/webhook<\/code> on your website).<\/li>\n\n\n\n<li>Subscribe to <code>payment_intent.succeeded<\/code>.<\/li>\n\n\n\n<li>Paste the signing secret into the <strong>Webhook Secret<\/strong> field of the Stripe Connect settings.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">When the <strong>Organizer Payment module<\/strong> is enabled and organizers connect their own Stripe accounts, the per-organizer settings include the same Webhook Secret field for their connected-account endpoint.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Testing_Your_Webhook\"><\/span>Testing Your Webhook<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Enable <strong>Sandbox\/Test mode<\/strong> in the Stripe gateway settings (or use Stripe&#8217;s test keys).<\/li>\n\n\n\n<li>Book an event with Stripe&#8217;s <a href=\"https:\/\/docs.stripe.com\/testing\" target=\"_blank\" rel=\"noopener\">test card<\/a> (e.g. <code>4242 4242 4242 4242<\/code>).<\/li>\n\n\n\n<li>Close the browser tab immediately after paying, before the redirect happens.<\/li>\n\n\n\n<li>After a few seconds, check <strong>MEC > Bookings<\/strong>: the booking should appear as confirmed, delivered by the webhook, not the redirect.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You can also inspect deliveries under <strong>Developors &gt; Webhooks &gt; your endpoint<\/strong> in the Stripe dashboard to see each event MEC received.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Troubleshooting\"><\/span>Troubleshooting<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&#8220;Invalid Stripe webhook signature&#8221;<\/strong><br>The signing secret does not match. Reveal the secret of the exact endpoint you created and paste it again in MEC. If you recreated the endpoint, remember the new endpoint gets a new secret.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&#8220;Stripe webhook secret is not configured&#8221;<\/strong><br>The Webhook Secret field in MEC is empty. Complete Step 4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Events appear in Stripe but bookings are not confirmed<\/strong><br>Make sure the endpoint is subscribed to <code>payment_intent.succeeded<\/code> (not <code>checkout.session.completed<\/code> or other events), and that the webhook URL points to the same website that holds the booking.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will walk you through configuring Stripe webhooks so MEC completes bookings reliably, even when the customer never returns to your website. Why Webhooks? By default, MEC confirms a Stripe booking when the customer is redirected back to your website after payment. If the customer closes the browser tab, loses connection, or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","knowledgebase_cat":[11],"class_list":["post-13515","knowledgebase","type-knowledgebase","status-publish","hentry","knowledgebase_cat-booking"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase\/13515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/types\/knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/comments?post=13515"}],"version-history":[{"count":2,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase\/13515\/revisions"}],"predecessor-version":[{"id":13517,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase\/13515\/revisions\/13517"}],"wp:attachment":[{"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/media?parent=13515"}],"wp:term":[{"taxonomy":"knowledgebase_cat","embeddable":true,"href":"https:\/\/webnus.net\/dox\/modern-events-calendar\/wp-json\/wp\/v2\/knowledgebase_cat?post=13515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}