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.


1 Answer 1


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:

I hope I didn't miss anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.