Checking access…

Skip to main content
Audience: Consumers, CCG Platform Engineers

Retry Mechanisms β€” Overview

Overview​

The retry functionality is a critical component of the payment processing system, designed to handle transient failures and provide users multiple opportunities to successfully complete their payment transactions. This mechanism permits up to 5 attempts when a user encounters a failure during payment or payment method entry validation.

Key Benefits:

  • Improved Success Rates: Reduces transaction abandonment by providing multiple attempts
  • Enhanced User Experience: Offers clear guidance through error messages
  • Seamless Recovery: Allows users to correct mistakes without restarting the entire payment process
  • Detailed Error Feedback: Provides specific information about what went wrong and how to fix it

What is Retry Logic?​

A retry mechanism is a strategy designed to allow users to retry failed operations, aiming to recover from errors or failures. This mechanism ensures the system continues to operate smoothly by pausing and allowing retry operations for a fixed number of times, such as 5.

Add Payment Method Retry Flow​

Make Payment Retry Flow​

Session Modes and Behaviors​

In the CCG widget, the retry mechanism is implemented to handle different session modes, specifically for PAYMENT, PAYMENT_METHOD_ENTRY, and PAYMENT_WITH_WALLET modes. The behavior varies based on the mode:

  • For PAYMENT and PAYMENT_METHOD_ENTRY modes, after all retry attempts are exhausted, the session becomes invalidated, and a dead-end screen is displayed to the user. This indicates that the user has reached the maximum number of allowed attempts without successfully completing the payment or payment method entry process.

  • In contrast, for the PAYMENT_WITH_WALLET mode, upon exhausting all retry attempts, the retry count is reset, and the user is redirected back to the wallet screen. A warning message is displayed to inform the user about the need to add payment method details again. Unlike the previous modes, the session in this case is not invalidated, allowing the user to attempt the payment process again.

PAYMENT mode:

PAYMENT mode

PAYMENT_METHOD_ENTRY mode:

PAYMENT_METHOD_ENTRY mode

PAYMENT_WITH_WALLET mode:

PAYMENT_WITH_WALLET mode

This detailed explanation outlines the specific behaviors and outcomes associated with the retry mechanism in the CCG widget across different session modes, ensuring a clear understanding of how the system responds to various user actions and attempts.

Retry Logic for Making vs. Adding a Payment Method​

Both flows share the same retry mechanics β€” up to 5 attempts, with a dead-end error screen in the hosted experience (and briefly in the embedded modal experience; the embedded inline experience shows no dead-end screen) once exhausted.

For making a payment, webhook event PAYMENT_FAILED is triggered for the failed last payment attempt for CARD, and for each failed attempt for BANK_ACCOUNT.

For adding a payment method, the same retry stages apply β€” up to 5 attempts, with guided error messages at each step.

Sample webhook payloads

See Retry Mechanisms β€” Settings, Webhook & Error Reference for the full PAYMENT_FAILED webhook payloads for CARD and BANK_ACCOUNT.

Error Categories​

When implementing retry logic, it's important to understand the different types of errors that can occur during payment processing:

  • Retriable Error β€” an error that can be resolved by the user (entering correct details, trying a different payment method). Most of the time these aren't system-related and can be fixed by the user.
  • Input Validation Error β€” occurs when the user enters incorrect details (e.g., an invalid card number). Not retriable for cards.
  • Business Rules Validation Error β€” occurs when the user enters correct-looking details but the system cannot validate them (e.g., an incorrect bank routing number triggers an Early Warning Service error). Retriable for ACH.
  • Payment Processor Error (e.g., Stripe) β€” occurs when the system cannot process the payment method details (e.g., a declined card). Retriable for cards.
Full classification table and sample error payloads

See Retry Mechanisms β€” Settings, Webhook & Error Reference for exactly which error type is retriable per payment method, and sample error JSON for each type.

Session Mode Behavior, In Brief​

Retry behavior also depends on session mode: for PAYMENT and PAYMENT_METHOD_ENTRY, exhausting all retries invalidates the session and shows a dead-end screen. For PAYMENT_WITH_WALLET, exhausting retries instead resets the retry count and returns the user to the wallet screen with a warning β€” the session is not invalidated.

Full session-mode configuration table

See Session Mode Configuration for the exact webhook/invalidation/screen behavior per session mode and payment method.