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. This process is not customizable. However, you can control the communications that your customers receive. For more information on that, please see the Customer Communication section.

Customer Payment Issues

Insufficient Funds

Every 7 days

Exceeds Daily Limit

Every 3 days

Call Issuer

Every 3 days

Temporary Hold

Every 6 days

Generic Declines

Retry every 3-5 days, based on dunning length

PayPal Decline

Every 6 days

Hard Decline (Will Never Succeed)

Never. 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

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 them 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.

Manual Retry/Force Collection

A forced collection attempt can occur at any time by clicking the Collect Now button on an open invoice

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).

Reopening Invoices and Dunning

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.

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.