# Common Errors and How To Handle Them
source: https://developer.mastercard.com/mastercard-gateway/documentation/testing/comm-error-and-how-to-handle/index.md

When testing your integration, consider the following transaction failure scenarios and make sure that your system reacts appropriately.

### Payment authorization declined or card type not accepted {#payment-authorization-declined-or-card-type-not-accepted}

If the `response.gatewayCode` in your transaction response has a value that starts with `DECLINED`, the issuing bank has not approved the payment authorization, or the payer is attempting to use a card type that the gateway does not accept. Review the returned gateway code and other transaction details to determine why the payment was declined. You may need to ask the payer to use a different payment method.

### Invalid card information {#invalid-card-information}

If the `response.gatewayCode` in your transaction response is set to `INVALID_CSC`, `EXPIRED_CARD`, or a similar value, the issue is with the payer's card details. The payer may have entered the details incorrectly, or the card may no longer be valid. Ask the payer to verify their card details or use a different card.

### Insufficient funds {#insufficient-funds}

If the `response.gatewayCode` in your transaction response is set to `INSUFFICIENT_FUNDS`, the payer's account does not contain enough funds to cover the transaction. Ask the payer to use a different payment method or card.

### Transaction timeout {#transaction-timeout}

If the `response.gatewayCode` in your transaction response is set to `TIMED_OUT`, the gateway did not receive a response from the acquirer. As a result, the transaction was terminated automatically. Try the transaction again later.
