--- title: "Reduce card declines with automatic retries | Dunning | ViewLift Docs" slug: "payment-dunning-or-retries" description: "Learn how ViewLift manages card declines through automatic retries and dunning." updated: 2023-08-11T23:29:14Z published: 2023-08-11T23:29:14Z canonical: "docs.viewlift.com/payment-dunning-or-retries" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.viewlift.com/llms.txt > Use this file to discover all available pages before exploring further. # Reduce card declines with automatic retries | Dunning Stripe, Paygate, PayPal, and JusPay charge users at the beginning of each billing cycle through the card information stored on your platform. In cases where card payments fail, ViewLift allows you to manage card declines through automatic retries and dunning. The Dunning / Retry Configuration is available in **AppCMS** > **Settings** > **PAYMENT CONFIGS** > **Dunning / Retry Config.** If you would like to use this feature, please let us [know](mailto:techsupport@viewlift.com) as this setup requires backend enablement. ### **About Dunning** Dunning is the process of trying to collect a payment that has been declined. There are two types of dunning cycles: one for the first-time charge, when a user subscribes for the first time with no free trial, and another for the regular renewal cycle. The settings for each dunning cycle can be configured separately. For example, you can specify how many times the system will attempt to retry the payment, and at what intervals. If a user's first renewal payment is declined after a free trial period, they are added to the dunning queue. The system will then attempt to retry the payment at the intervals specified in the dunning settings. For example, if the initial renewal date after a free trial period was February 16 and retries are configured for every other day (1, 3, 5, 7), then retries will occur four times until February 23. ![](https://cdn.document360.io/15e0c142-c823-4c77-a8e8-9d32ca937982/Images/Documentation/dunning(4).png) ### Screen elements | **Screen element** | **Description** | | --- | --- | | **First Charge Retr****y** | Activate payments retries after the trial subscription plan ends or when a subscription is upgraded/downgraded. | | **Renewal Retry** | Activate payment retries on recurring plan renewals. | | **Backoff Multiplier** | Used to increase the wait time between each retry attempt, by multiplying the **Retry Interval** by a certain factor after each failed attempt. For example, if the **Retry Interval** is set to **1 hour** and the **Backoff Multiplier** is set to **2**, then the system will wait 1 hour after the first failed attempt, 2 hours after the second failed attempt, 4 hours after the third failed attempt, and so on. | | **Retry all codes** | Select the toggle to retry on all the decline codes in ViewLift's Payments database for a payment processor. | | **Max allowed retries** | Maximum allowed retry counts depending on a payment gateway's policies. | | **Retry type** | The frequency to retry the user after the failed payment. For example, the first retry job is typically set to three days after the failed payment. The second retry will happen after 7 days of subsequent failed payment. | | **Enter decline codes** | All the decline codes that ViewLift supports. | | **Enter retry interval** | Trigger automatic payment retries at specified time intervals. | ### Dunning Retries: ViewLift vs. other providers | Description | ViewLift | Recurly | ChargeBee | | --- | --- | --- | --- | | Automatic Invoice Dunning Cycle | Payment Declined emails sent for automatic invoices | Number of retry attempts is configurable. The default is 4 retries after the initial attempt and with configurable intervals (hours, days, week) | 4 retries after the initial attempt, with configurable intervals (days) | 3 retries after the initial attempt with configurable intervals (days) | | Manual Invoice Dunning Cycle | Invoice Past Due emails sent for manual invoices | Not Applicable, as we don't support manual invoicing | Yes | Yes | | Trial Dunning Cycle | Post-Trial Payment Declined emails sent for invoices that fail immediately after a free trial | Yes | Yes | Yes | | Can configure retry error codes? | Allow options to configure the decline codes that need to be retried | Yes | No | No | | Multiple dunning cycles | Option to configure different dunning configurations for different plan cycle | No | Yes | No | ### Dunning error codes Dunning error codes may vary depending on the payment gateway being used. #### Credit card dunning error codes (Paygate) Here are the retry codes we currently have on cards processed through Paygate. | Decline Code | Description | | --- | --- | | 900002 | Card Expired | | 900003 | Insufficient Funds | | 900005 | Bank Interface Timeout | | 900007 | Declined | | 900010 | Invalid Card Length | | 900020 | Auth Declined | To retry for any additional codes, please submit a support ticket. The documentation link for status codes is [here](https://docs.paygate.co.za/#result-codes). #### Payment retries for PayPal By default, PayPal will automatically attempt to retry a failed payment three times over a period of five days. After these three attempts, if the payment still fails, the subscription is canceled automatically. We cannot manually set the number of retry attempts from Tools. #### Payment retries for JusPay #### ![](https://cdn.document360.io/15e0c142-c823-4c77-a8e8-9d32ca937982/Images/Documentation/image-1682592155489.png)The Juspay API is called at specific time intervals when we don't receive payment notifications. #### Credit card dunning error codes (Stripe) Here are the retry codes for dunning on credit card payments processed through Stripe. 1. card_velocity_exceeded 2. do_not_honor 3. expired_card 4. generic_decline 5. insufficient_funds 6. issuer_not_available 7. no_action_taken 8. processing_error 9. stop_payment_order 10. transaction_not_allowed 11. try_again_later 12. withdrawal_count_limit_exceeded If retryAllCodes Keys are there, then declineCodes:[] is not needed. Stripe error codes are here https://stripe.com/docs/error-codes Stripe bank decline codes are here https://stripe.com/docs/declines/codes The following code block presents a sample JSON format for Stripe retry: ```json { "firstChargeRetry": { "active": true, "STRIPE_ERROR": { "backoffMultiplier": 1.5, "retryAllCodes": true, "declineCodes": [ "card_velocity_exceeded", "do_not_honor", "expired_card", "generic_decline", "insufficient_funds", "issuer_not_available", "no_action_taken", "processing_error", "stop_payment_order", "transaction_not_allowed", "try_again_later", "withdrawal_count_limit_exceeded", "incorrect_zip", "incorrect_number", "pickup_card" ], "retryInterval": [ 7, 7 ], "maxAllowedRetries": 3, "retryType": "day" } }, "renewalRetry": { "active": true, "STRIPE_ERROR": { "backoffMultiplier": 1.5, "retryAllCodes": true, "declineCodes": [ "card_velocity_exceeded", "do_not_honor", "expired_card", "generic_decline", "insufficient_funds", "issuer_not_available", "no_action_taken", "processing_error", "stop_payment_order", "transaction_not_allowed", "try_again_later", "withdrawal_count_limit_exceeded", "incorrect_zip", "incorrect_number", "pickup_card" ], "retryInterval": [ 8, 7, 7, 7 ], "maxAllowedRetries": 5, "retryType": "day" } } } ``` We also save this data in Mandrill so you can communicate with your users if they want to and prompt them to try a different card or fix the payment issue before suspending the subscription. The data in Mailchimp will have a variable "retryCount" and you can code the template to send different emails each time from soft push to hard. To send users different emails at different steps of failure, refer to this sample code. ```markup *|SUBJECT|*

Please review your payment details

Unfortunately your payment due on {{subscriptionEndDate}} for BRAND NAME in the amount of {{currencyCode}} {{totalAmount}} has been declined by your bank. This could be due to a change in your card number, your card expiring, cancellation of your credit card or the bank declining payment.

To continue accessing hundreds of shows focused on horses, equestrian sport, and country lifestyle, please review your billing information as soon as possible.


We will attempt to take payment again on {{nextRetryDate}}.

Your current plan: {{name}} Amount: {{currencyCode}} {{totalAmount}} Frequency: {{billingFrequency}} {{#if brand}} Card: {{brand}} {{/if}} {{#if last4}} ending in {{last4}} {{/if}}

Having trouble updating your account?

If you subscribed through our Website or Android TV please follow these instructions:

  1. Log into your account
  2. Navigate to Manage Account in the top-right menu
  3. Select the "Manage Payment Details" button and follow the on-screen instructions to update your payment information

Thank You,

The support team at BRAND NAME

Follow Us

Get all the latest news, tweets and videos from BRAND NAME

Copyright © 2022 Example TV, All rights reserved.

You are receiving these emails because you paid for a subscription to the BRAND NAME service.

You can update your preferences or unsubscribe from weekly emails

``` To send users different emails based on the language, please refer [here](https://docs.viewlift.com/docs/language-specific-emails-to-user-by-country-in-mailchimp-or-mandril).