Generic error during transaction

Hello,

I am encountering an issue where transactions are approved by the cardholder’s bank and the charge is reflected on their account, but Square declines the payment shortly after and processes a refund.

Here are the key details of the issue:

  1. The bank confirms the charge without any issues.
  2. Square returns a GENERIC_DECLINE error and marks the transaction as failed.
  3. The payment is refunded automatically despite being authorized by the bank.

This has been tested with small amounts (e.g., $0.02 USD or $2.00 USD), and the issue persists. Could you please clarify if there are specific restrictions or additional steps I need to take to resolve this?

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Square Developer
Refund a Payment with an Application Fee
Refunds API

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The GENERIC_DECLINE error typically indicates that the card issuer declined the payment. However, if the bank confirms the charge without any issues, it’s possible that the decline is happening on Square’s end due to certain risk factors.

Square has built-in security measures to protect against potential fraudulent activity. These measures can sometimes result in legitimate transactions being declined. Factors that can contribute to a decline include the frequency of transactions, the size of the transactions, or the location of the transactions.

If you’re testing with small amounts repeatedly, this could potentially trigger Square’s security measures, as this is a common pattern seen in fraudulent activity.

To avoid this, try testing with more realistic transaction amounts and patterns. If the issue persists, it would be best to reach out to Square Support directly for further investigation.

This answer was reviewed by @Bryan-Square.

Thank you for your response. We have already tested with a higher amount of $21 USD, but the issue persists. The bank confirms the charge successfully, yet Square still declines the payment with a GENERIC_DECLINE error and processes a refund.

Could you provide further clarification or guidance on what might be causing this issue?

What’s the payment_id? :slightly_smiling_face:

here’s the payment_id ```
zto7WKso2Ug1l9kvnMm8oFCN1adZY

Are you testing on a new account outside of our supported regions? If you are testing with a new account and small amounts repeatedly, this could potentially trigger Square’s security measures, as this is a common pattern seen in fraudulent activity. :slightly_smiling_face:

We are testing on behalf of a U.S.-based company while working from Mexico. The account is linked to a company operating within the United States, and all testing is being conducted under legitimate circumstances.

The issue persists even with realistic transaction amounts, such as $21 USD. The bank confirms the charge successfully, but Square declines the payment and refunds it shortly after.

Could this behavior be related to our testing location, or are there specific steps we should take to avoid triggering Square’s security measures?

Thank you for your assistance.