The Reference Docs Developer Hub

Welcome to the Reference Docs developer hub. You'll find comprehensive guides and documentation to help you start working with Reference Docs as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Dunning Management

When a customer's payment fails, Recurly kicks off a process called dunning management (Delinquent User Notification). This process involves user communication, payment reconciliation, and payment retries.

Retry Schedule

While an invoice is past due and in the dunning process, Recurly automatically attempts to collect the invoice using the optimal retry strategy for the payment type and error. In order to optimize the efficiency of our retry schedule, we alter the retry schedule for a small number of invoices. Please treat the retry timelines described below as a guideline. This process is not customizable by you. You can, however, control the communications that your customers receive. For more information on that, please see the Customer Communication section.

Customer Payment Issues

Soft Declines

Soft declines such as insufficient funds, a generic error, or a temporary hold will be retried by Recurly. Recurly will attempt to use the same payment method.

Hard Declines

Hard declines, such as customer closing their account, cannot be resolved immediately; and subsequent attempts with the same payment method will not succeed.

Gateway Payment Issues

Try Again/Gateway Error

Every 2 days*

Issuer or Gateway Unavailable

Every 3 days*

Communication/Configuration Error

First retry up to 2 times, 4 hours apart
Next retry up to 6 times, 1 day apart
Finally retry through end of dunning cycle, 3 days* apart

  • Please note that we alter the retry schedule for a small number of invoices in order to draw insights and optimize our retry schedule. Please treat above retry timelines as a guideline.

Maximum Retries

The transaction retry attempts on an invoice will stop after 12 transaction declines from the payment gateway, 20 total transaction attempts (including gateway unavailability), or 60 total days since the invoice creation date.

Configuration

Dunning preferences can be accessed in your account's Configuration panel. On this page, admins can change the failed payment notification intervals, number of notification attempts and the desired end-result when payment is unsuccessfully collected. Each invoice will follow the dunning configuration that was active at the time when an invoice entered dunning.

If you decide to delay the first email communication to the customer then Recurly will try to retry the transaction once before the customer email is sent. Also, if you have configured a delayed email to the customer then you have the option of letting Recurly send an email immediately for transactions with hard declines (since Recurly can't retry the transactions with hard declines).

Customer Communication

In the process of dunning an account, Recurly can send several emails to your customer notifying them of failed payment and any subsequent subscription changes due to non payment:

  1. First, Recurly will send a "Payment Declined" email letting the customer know their payment failed, and prompting them to update their billing information.

  2. Recurly will then retry the payments and send the appropriate notification emails (depending on the outcome) based on your dunning management settings.

  3. If the customer does not respond to these emails by updating their billing information, Recurly sends a "Subscription Canceled Nonpayment" email letting the customer know their subscription has been terminated for non-payment. This ends their subscription immediately.

Customizing Customer Communication

You must have Configuration permissions to perform this task.

  1. Navigate to your Dunning Management page.

  2. Adjust the number of emails you'd like your customers to receive by pressing the + and - buttons.

  3. Adjust the number of days in between emails. The total number of days should be fewer than your shortest billing cycle length.

  4. Choose an outcome if the payment fails at the end of the dunning cycle. You may either expire the subscription, or leave it active.

Webhooks

Webhooks can be used to keep your service synchronized with payment issues inside of Recurly.

Dunning Event

Sent when invoices that enter and remain in dunning and will follow the same dunning schedule as configured under Dunning Management in Recurly. These push notifications are delivered regardless of whether or not merchants use Recurly to send customer communication. Recurly merchants use this push notification to customize customer email for each dunning step or to reach customers using different communication channels (email, SMS, Slack channel etc)

Failed Payment

Sent after each failed payment. Recurly merchants use this push notification to flag a user as past-due inside their application and encourage them to update payment information.

Successful Payment

Sent after a successful payment. Recurly merchants use this push notification to recognize when a previously past-due user is now back in good standing.

Subscription Expired

Sent if Recurly terminates a subscription due to non-payment or if the subscription is canceled and no longer valid. When this notification is received, the subscription should be immediately terminated in your system. This is the primary notification you should catch if you are receiving push notifications.

Learn more about Recurly's webhooks, or see our webhooks documentation for developers.

Updating Billing Info

When your customers receive a failed payment email, they need to know how to update their billing information. The default payment declined email template offers your customers a direct link to their hosted account management page, where the customer can provide updated billing information.

You can include a direct link to a customer's account management page from your website using the hosted_login_token parameter available on the Accounts API. API users can also update the email template to point to a billing update form on their own website.

Whenever billing information is updated successfully, Recurly will retry collection on any past due invoices on the account.

Manual Retry/Force Collection

A forced collection attempt can occur at any time by clicking the Attempt Collection Now button on the Invoice Details page of a past due invoice. If the past due invoice is still in the automated retry process, each forced collection will increment the total number of transactions allowed for the automated retry schedule. This means you may reach your max transaction count for automated retries early if you click the button a lot.

Once the invoice reaches the maximum number of retry attempts, you will see "Retry schedule complete" displayed in the "Next Attempt:" section. You can continue to force collection, but at this point Recurly is not automatically retrying collection for you. It is important to note that the dunning schedule will end the automated retry schedule, even if the max number of transactions have not been completed.

Stop Dunning

The dunning process can be halted on an account by opening the past due invoice, clicking on the Stop Collection tab, and selecting either the Stop Collecting option, which will mark the invoice as failed, or the Mark Paid option, which will indicate that the invoice was successfully paid for (this option is typically used when funds are received outside of Recurly).

Either option will move the invoice to a Closed state and will stop all future collection attempts on the invoice.

Please Note: Stopping collection on an invoice will not automatically cancel the related subscription. The subscription needs to be canceled separately in order to stop the subscription from renewing again.

A subscription will only be canceled automatically if an invoice fails dunning (assuming your dunning settings are configured to expire a subscription at the end of the dunning process).

Invoices

An invoice enters the dunning cycle when it's state moves to Past Due. For an automatic collection invoice, this is after the initial payment transaction fails. For a manual collection invoice, this is when the net terms are passed. Recurly allows you to configure separate dunning schedules for your automatic and manual collection invoices.

By default, dunning settings will automatically fail an invoice at the end of the dunning cycle if the invoice has not been paid. A failed invoice is Recurly's way of writing it off as bad debt, removing the owed balance from the customer's account. You can change your dunning settings to never auto-fail the invoice and leave the invoice past due. When you change the invoice dunning setting, all invoices currently in dunning (in a past due state), will still either fail or stay past due based on the previous setting, but new invoices entering dunning will start to follow the new setting. This is due to the fact that dunning settings are versioned to make sure an invoice currently in a dunning step doesn't all of a sudden get a new schedule.

Users with permissions to edit the Customer section have the option to reopen failed manual invoices. If a failed manual invoice is reopened, dunning will not restart (no dunning emails will be sent) and the associated subscription will not be effected. When a manual invoice is reopened, it will remain in an Open state indefinitely until it's closed and marked paid/failed.

After Dunning

If you leave your invoices past due after the dunning cycle is complete there are two ways to attempt collection again on the invoice. Both of the below actions will send all past due invoices on the account into collections.

  • Have the customer update their billing information
  • Add a new subscription to the account (resubscribe the customer)

Test Dunning Behavior

Merchants wanting to speed up the dunning behavior to test webhooks, delivery of email, and other variables may follow the below instructions to put an account through dunning in sandbox mode.

  1. Subscribe an account using the "Success" test card number: 4111-1111-1111-1111
  2. Update the account's billing information to use the "Fail, but save" test card number: 4000-0000-0000-0341 (note: it will appears this action returns an error, but this is expected. The card number will still save on the account).
  3. Speed up the renewal process by clicking "More info" on the subscription, then "Change Renewal Date" on the subscription details page
  4. Set the subscription's next renewal date 1 hour in the future
  5. The subscription will renew within the hour, kicking off your dunning process.

Dunning Management

When a customer's payment fails, Recurly kicks off a process called dunning management (Delinquent User Notification). This process involves user communication, payment reconciliation, and payment retries.