Manage Card-on-File Declines

Applies to: Cards API | Webhooks

Use Square features and guidance to help manage or reduce declines for card-on-file payments and increase customer retention.

Link to section

card.automatically_updated event notifications

To proactively manage potential declines due to expired card data or closed accounts, subscribe to receive card.automatically_updated event notifications when Square automatically updates cards on file. You can subscribe manually in the Developer Console or programmatically using the Webhook Subscriptions API.

When you receive a card.automatically_updated notification, inspect the card object in the notification payload and take appropriate action:

  • Expiration updates - When allowed by the issuing bank, Square automatically updates the expiration date and last 4 digits of expiring cards on file. By listening for these updates, you can help ensure that card information remains current if the expiration date or card number changes.

    To use this feature:

    1. In the notification payload, check the exp_month, exp_year, and last_4 fields.
    2. If you store this card information, update your records.

  • Issuer alerts about closed accounts (Beta, select Mastercard cards only) - For some Mastercard cards on file, the issuing bank alerts Square when the underlying account is closed. Square then marks the card as ISSUER_ALERT_CARD_CLOSED.

    Issuer alerts aren't guaranteed to be accurate, but they're a strong signal that future charges to the card are likely to fail. In testing, 80% of cards with issuer alerts were declined at the time of payment. By proactively contacting customers to set up a new payment method on file, you can reduce the likelihood that recurring subscriptions become delinquent.

    Note

    To access issuer alerts, Square API version 2024-12-18 or later is required for your webhook subscription or when calling the Cards API.

    To use this feature:

    1. In the notification payload, check whether the issuer_alert field is present. If present and set to ISSUER_ALERT_CARD_CLOSED, check the issuer_alert_at field to determine whether this is a new alert.
    2. If the account is newly marked as closed, request a new payment method from the customer.

    If notified by the issuing bank that the underlying account for the card on file is closed, Square sets the issuer_alert field to ISSUER_ALERT_CARD_CLOSED, updates the issuer_alert_at timestamp, and invokes a card.automatically_updated event.

    The issuer_alert and issuer_alert_at fields are present only when the card has an active issuer alert. If notified by the issuing bank that the account is reopened, Square clears both fields and invokes a card.automatically_updated event.

    The following example payload contains the issuer_alert and issuer_alert_at fields, which indicates that there's an active issuer alert:

Square also supports card.created, card.updated, card.disabled, and card.forgotten webhook events for the Cards API.

Did you know?

The Events API can be used with webhook subscriptions for recovery and reconciliation of missed webhook events.

Link to section

SCA verification

Strong Customer Authentication (SCA) provides an additional layer of fraud protection in regions where SCA is required or for sellers that subscribe to Square Risk Manager to enforce 3-D Secure (3DS). SCA applies both when saving cards on file and making card-on-file payments.

To help reduce the likelihood of declines for card-on-file payments, provide as much buyer information as possible to the Web Payments SDK or In-App Payments SDK. For more information, see Charge a Card on File for Web Payments SDK integrations or Verify a Buyer for In-App Payments SDK integrations.

Link to section

Health account cards (Beta)

Square uses the Bank Identification Number (BIN) to determine whether a card on file is for a Health Savings Account (HSA) or a Flexible Spending Account (FSA), which can be used for authorized medical expenses. For these cards, Square sets the Card.hsa_fsa field to true.

You can use the hsa_fsa field to identify HSA and FSA cards, which tend to have higher decline rates as the year progresses because they might run out of funds. Sellers accepting card-on-file payments should ask customers to provide a secondary payment method on file when saving an HSA or FSA card on file.

Note

Square API version 2024-12-18 or later is required to access the hsa_fsa field.

Link to section

Prepaid cards

A prepaid card is a type of payment card that can hold a certain amount of value. For these cards, Square sets the Card.prepaid_type field to PREPAID.

You can use the prepaid_type field to identify prepaid cards, which tend to have higher decline rates because they run out of funds. Sellers accepting card-on-file payments should ask customers to also provide a secondary payment method on file when saving a prepaid card on file.

Link to section

Additional best practices

Link to section

Logging and audits

Keep detailed logs of transaction attempts and declined payments to identify and address recurring issues. Conduct regular audits of transaction flows to ensure compliance with regulations and identify any potential issues.

Link to section

Retry strategy

Consider the following factors when designing your retry strategy:

  • Check the decline reason to determine the appropriate action:
    • INSUFFICIENT_FUNDS - Retrying after a few days might be effective.
    • GENERIC_DECLINE error - Don't retry. Instead, inform the buyer that the specific reason for the decline isn't available and advise them to contact their issuer for further details and assistance. Sometimes the specific reason for a card decline is unavailable because of limitations in the information provided by the issuing bank.
  • Wait at least 24 hours before retrying. Immediate retries can trigger fraud alerts or cause additional declines.
  • Limit retries to 2 to 3 attempts over several days to avoid triggering fraud alerts. Excessive retries can be flagged as suspicious activity.
Link to section

Customer communication

When possible, inform buyers when a decline occurs and suggest they contact their issuing bank for further details and assistance, especially when the exact reason for the decline isn't available.

If a charge continues to fail, request a new payment method from the customer.

Link to section

See also