Forms submitting information even with credit card failures

I have a form that uses the stripe add-on. It collects some data for a course, then asks for credit card details. If the customer has an issue with their card, stripe will come back and say so and they hopefully correct this. That said, the form is submitting the other data. I only want form data to be submitted if the credit card transaction goes through. Any ideas? Thanks.

The Stripe add-on provides two payment methods:

Stripe Card - Using this payment method you need to add a card field to the form and entries are created only after successful payment.

Stripe Checkout - Using this payment method the user is redirected to a Stripe hosted page to proceed with the payment, in this case the entry is created before the redirect.

If you’re having issues with the Stripe Card method, please open a support ticket.