<p>OK, this was caused by a simple oversight on my part. To simplify matters for anyone else trying to set up Stripe, here is your checklist:</p>
<p><strong>In your templates</strong></p>
<ul>
<li>Verify that you are using the latest version of JQuery.</li>
<li>Verify that you are NOT using deprecated onLoad. It should be  <code>$('#paymentMethodId').on('load', function(){</code>, not <code>$('#paymentMethodId').onLoad(function(){</code></li>
</ul>
<p><strong>At Stripe:</strong></p>
<ul>
<li>Set up a webhook endpoint. Get your endpoint URL from the Stripe gateway page in Commerce.</li>
<li>Set the webhook to accept &quot;All Events&quot;. If you read the docs you can narrow this down considerably.</li>
<li>Copy the webhook signing secret. You will need this for Commerce.</li>
</ul>
<p><strong>In the Commerce Stripe gateway page:</strong></p>
<ul>
<li>Enter your publishable and secret API keys.</li>
<li>Enter the webhook signing secret in the Webhook Signing Secret field for the Stripe gateway. Preferably via the .env file like a good Craft citizen.</li>
</ul>
<p><strong>In your config &gt; general.php file:</strong></p>
<ul>
<li>Disable CSRF for your webhook URL as detailed here: <a href="https://craftcms.stackexchange.com/a/21304/4506">https://craftcms.stackexchange.com/a/21304/4506</a></li>
</ul>
<p>I hope I didn't miss anything.</p>

CC BY-SA 4.0
2021-02-16T15:30:13.220Z
2021-02-16T15:30:13.220Z
Wonko
<p>Folks:</p>
<p>A site I have works great in test and has been pushed live. Orders do not complete on the live site. When the transaction is submitted &quot;Card confirmed&quot; appears (I'm riffing off the included templates) and the page hangs. No transaction goes to Stripe and no confirmation email is fired.</p>
<p>I have added the live keys so that's not the issue. Perhaps webhooks are needed?</p>
<p>Any help would be great.</p>

CC BY-SA 4.0
2021-02-10T04:37:01.293Z
send your live site link to support@craftcms.com and we can take a look
Luke Holder
<plugin-craftcommerce><plugin-commerce-stripe>
Stripe order hangs when submitted
# Stripe order hangs when submitted

(Asked by: username_0 on 2021-02-10)

Folks:

A site I have works great in test and has been pushed live. Orders do not complete on the live site. When the transaction is submitted "Card confirmed" appears (I'm riffing off the included templates) and the page hangs. No transaction goes to Stripe and no confirmation email is fired.

I have added the live keys so that's not the issue. Perhaps webhooks are needed?

Any help would be great.

**Tags:** plugin-craftcommerce, plugin-commerce-stripe
> **Comments:**
> **username_1**: send your live site link to support@craftcms.com and we can take a look  

---

## 1 answers

### Answer by username_0 on 2021-02-16. Score: 1 | Accepted answer

OK, this was caused by a simple oversight on my part. To simplify matters for anyone else trying to set up Stripe, here is your checklist:

**In your templates**

* Verify that you are using the latest version of JQuery.
* Verify that you are NOT using deprecated onLoad. It should be `$('#paymentMethodId').on('load', function(){`, not `$('#paymentMethodId').onLoad(function(){`

**At Stripe:**

* Set up a webhook endpoint. Get your endpoint URL from the Stripe gateway page in Commerce.
* Set the webhook to accept "All Events". If you read the docs you can narrow this down considerably.
* Copy the webhook signing secret. You will need this for Commerce.

**In the Commerce Stripe gateway page:**

* Enter your publishable and secret API keys.
* Enter the webhook signing secret in the Webhook Signing Secret field for the Stripe gateway. Preferably via the .env file like a good Craft citizen.

**In your config > general.php file:**

* Disable CSRF for your webhook URL as detailed here: <https://craftcms.stackexchange.com/a/21304/4506>

I hope I didn't miss anything.


---

