Why is there a pending transaction on my bank account when my payment failed?

We use Braintree as payment gateway for debit and credit cards. Braintree is a validated Level 1 PCI DSS Compliant Service Provider and is a PayPal company.

When a payment transaction is started, a few basic checks are done by Braintree. The information is then passed to the processor (your bank / card issuer). The processor can reject the transaction because funds are insufficient, expiration date is wrong, CVV does not match, etc. In that case no payment authorization or capture is done and the transaction fails. If on the other hand, the transaction succeeds, you will see it as pending on your bank account.

Now Braintree will still check a few things. The reason being:

Many banks approve transactions even if the address information or Card Verification Value (CVV) included with the transaction doesn’t match what they have on file.

If for example the CVV code does not match or ZIP code does not match and the processor still allowed the transaction to succeed, Braintree will reject the transaction on its behalf. In that case, it will void the transaction that succeeded at the processor.

https://articles.braintreepayments.com/control-panel/transactions/gateway-rejections

So if you happen to need 2 or 3 tries to get your card information in our system, you might see 2 or 3 pending authorizations on your bank account (limiting your available funds). These authorizations should disappear when they are voided but unfortunately some banks take their time in doing that and there is not much that can be done except wait.