Stripe PaymentElement form is not submitted when user closes browsertab

Hi,

When using stripe with payment element, using Bancontact payment method, the user is redirected to a Bancontact payment page.
There the user needs to scan a QR code with a phone to approve the payment. After payment is confirmed, user is redirected back to the website and the form is submitted.

There is a small delay between approving on the phone and redirecting. Some users will close the page before the redirection has started.

Result:

  • Stripe marks payment as succeeded, user has paid.
  • From entry keeps being saved as draft (checked via phpmyadmin)
  • No confirmation mail or entry being submitted on the website
  • Webhook “payment_intent.succeeded” is called, from stripe to the website. However this is ignored.