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.