Overview: Recurly Recover

Use Recurly Recover's standalone retry engine to collect on past-due invoices from your existing billing platform — without adopting Recurly for subscription management.

Recurly Recover is a standalone retry engine for collecting on past-due invoices without requiring Recurly as your primary billing platform. Submit a failed invoice via the Recovery API, and Recurly automatically creates the account objects, calculates an optimized retry schedule, and manages the entire collection lifecycle until the invoice is paid or the retry window closes.

Onboarding includes

  • An active account with an API key generated.
  • At least one retry window (dunning campaign)

Limitations

  • Recurly Recover is designed for merchants who don't use Recurly for subscription management.
  • Each successful API call creates one account with one invoice. Calling the API again with the same account code returns an error.
  • Accounts can only be created via the API, not through the Admin UI.
  • Existing Recurly Subscriptions can utilize the Retries in RSM.

Key benefits

Works with your stack Use Recurly's retry engine without adopting Recurly for subscription management — it integrates with your existing billing system.
Flexible retry strategies Assign a different dunning campaign per API request, making it easy to A/B test retry windows and strategies across customer segments.
Fully managed collection Recurly handles the entire retry lifecycle — calculating optimal retry dates, managing payment attempts, and firing webhooks when the journey ends.
Minimal setup No need to configure plans, items, or taxes. Setup is limited to payment gateway, retry window, and API integration.

Key details

How Recurly Recover works

  1. A payment fails on your billing platform.
  2. You pause your internal retry logic for that invoice.
  3. You call the Recovery API with account details, payment method tokens, prior attempt history, and the retry window you want Recurly to use.
  4. Recurly creates an account, a past-due invoice, and a failed transaction.
  5. Recurly calculates the first retry date based on your submission and begins retrying per the assigned retry window.
  6. When a retry succeeds or the retry window is exhausted, Recurly fires a webhook. You update the invoice state in your system.
Warning Pause your internal retry logic before submitting an invoice to Recurly Recover. Running parallel retries on the same payment method risks double-charging your customer.

Configuration

Onboarding Flow

The first time you sign-in, you will be prompted through configuration.

1

Connect your payment gateway

In initial onboarding flow, click Add Gateway and follow the prompts to connect your gateway. You may continue to add gateways or click Continue to finish configuration.

2

Note the gateway code

Each gateway connection is assigned a unique gateway code. You'll pass this value in API requests to route transactions to the correct gateway. If you need to route different card types or merchant category codes through separate accounts, you can add multiple connections for the same provider — each gets its own gateway code.

3

Setup webhooks

In initial onboarding flow, enter your Endpoint URL and select the events you wish to send webhooks.

4

Your API Key

In initial onboarding flow, copy Your API key.

5

Make your API call

In initial onboarding flow, see the API Reference to make your API call.

API calls

Submit a failed invoice

Call POST /invoices/recovery to submit a failed invoice for collection. A successful request creates a Recurly account, a past-due invoice, and an initial failed transaction — and immediately begins the retry schedule.

Endpoint

POST https://v3.recurly.com/invoices/recovery

Request

{
  "currency": "str",
  "due_at": "2019-08-24T14:15:22Z",
  "po_number": "string",
  "external_recovery_eligible": true,
  "account": {
    "address": {
      "phone": "string",
      "street1": "string",
      "street2": "string",
      "city": "string",
      "region": "string",
      "postal_code": "string",
      "country": "string"
    },
    "billing_infos": [
      {
        "first_name": "string",
        "last_name": "string",
        "company": "string",
        "address": {
          "phone": "string",
          "street1": "string",
          "street2": "string",
          "city": "string",
          "region": "string",
          "postal_code": "string",
          "country": "string"
        },
        "ip_address": "string",
        "gateway_code": "string",
        "primary_payment_method": true,
        "backup_payment_method": true,
        "payment_gateway_references": [
          {
            "token": "string",
            "reference_type": "stripe_confirmation_token"
          }
        ],
        "network_transaction_id": "string",
        "transactions": [
          {
            "gateway_error_code": "string",
            "merchant_advice_code": "st",
            "attempted_collection_date": "2019-08-24T14:15:22Z"
          }
        ]
      }
    ],
    "code": "string",
    "email": "[email protected]",
    "custom_fields": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "dunning_campaign_id": "string"
  },
  "line_items": [
    {
      "tax": 0,
      "custom_fields": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "harmonized_system_code": "string",
      "product_code": "string",
      "quantity": 1,
      "description": "string",
      "unit_amount": 0
    }
  ]
}

Handle the response

A successful 201 response confirms that Recurly has created the account and started the retry process. Save the invoice_id from the response — you'll need it to stop retries later.

Note The Recover API response doesn't include a field for the next scheduled retry date. Use webhook notifications to track retry progress — see Step 4: Configure webhooks.

Response

{
  "object": "string",
  "charge_invoice": {
    "id": "string",
    "uuid": "string",
    "object": "string",
    "type": "charge",
    "origin": "carryforward_credit",
    "state": "open",
    "account": {
      "id": "string",
      "object": "string",
      "code": "string",
      "email": "[email protected]",
      "first_name": "string",
      "last_name": "string",
      "company": "string",
      "parent_account_id": "string",
      "bill_to": "parent",
      "dunning_campaign_id": "string"
    },
    "billing_info_id": "string",
    "subscription_ids": ["string"],
    "previous_invoice_id": "string",
    "number": "string",
    "collection_method": "automatic",
    "po_number": "string",
    "net_terms": 0,
    "net_terms_type": "net",
    "currency": "str",
    "discount": 0,
    "subtotal": 0,
    "subtotal_after_discount": 0,
    "tax": 0,
    "total": 0,
    "refundable_amount": 0,
    "paid": 0,
    "balance": 0,
    "dunning_campaign_id": "string",
    "due_at": "2019-08-24T14:15:22Z",
    "closed_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}

Stopping retries

You can stop all future retry attempts on an invoice at any time while it's in a past_due state.

Mark as paid — use when payment was collected outside of Recurly:

PUT https://v3.recurly.com/invoices/{invoice_id}/mark_successful

Mark as failed — use when you want to abandon collection:

PUT https://v3.recurly.com/invoices/{invoice_id}/mark_failed

Use the invoice_id returned in the original API response. Once marked, Recurly won't make any further retry attempts on that invoice.

Payment method wallet

When the Wallet feature is enabled, you can designate payment methods as primary or backup in your API request. You can submit multiple payment methods, but only one can be marked as primary.

Payment gateways

Currently supported gateways are Stripe and Braintree with resuable gateway tokens.

Learn more about gateways and token support.

Roles & permissions

Note This section describes Recurly Recover's current (stop-gap) roles and permissions model. A full custom-role system is planned; until then, access is managed through the four permission categories below.

How admin access is provisioned

1

Your site is provisioned on a Recover plan

Recurly configures your merchant account on either the Recurly Recover Annual Monthly or Recurly Recover Monthly plan.

2

The Admin user logs in

Because the account is subscribed to a Recover plan, this user sees the Recover UI and navigation. Until roles are created, they see only the Admin navigation link and page.

3

The Admin creates roles

Using Admin → Roles, the Admin user builds one or more roles from the permission categories in the table below.

4

The Admin invites users and assigns roles

Each invited user is assigned one of the roles created in the previous step.

5

Users get access based on their role

Newly added users can access only the pages granted by the permission categories on their assigned role. Every user — regardless of role — has access to the Recover dashboard.

Permission categories

CategoryGrants access to
Analytics & Insights
  • Recovered revenue
  • Payment processing
  • Retry & recovery
  • Campaign Performance
  • Invoices
  • Transactions
Configuration
  • Payment gateway settings — view and edit
  • Retention (retry window) settings — view and edit
Integrations
  • API credentials — view and edit
  • Webhooks — view and edit
Admin
  • Users
  • Roles
Tip A role can combine any number of these categories. For example, a role for a finance teammate might combine Analytics & Insights with Configuration, while a role for a developer might combine Integrations with Analytics & Insights.

FAQs

Do I need Recurly Subscriptions to use Recurly Recover?

No. Recurly Recover is designed as a standalone retry engine for merchants using other billing platforms. Combining Recurly Recover with Recurly Subscriptions is not recommended.

What happens when I submit a past-due invoice via the API?

Recurly creates an account (without a subscription), a charge invoice, and one or more failed transactions. Billing information is stored and Recurly automatically calculates the next collection attempt date based on your submission.

Can I stop retries on a past-due invoice?

Yes. While an invoice is in a past-due state, you can cancel all future collection attempts by marking the invoice as failed or paid using the Recurly Invoice API.

What happens when the retry window closes without a successful payment?

The invoice is marked as failed and a webhook event fires. No further retries are made. You can then handle the outcome in your system — for example, suspending access or triggering a win-back campaign.

What if a customer provides a new payment method outside of Recurly?

Mark the in-flight Recurly invoice as successful (if payment was collected) or as failed (to stop the current attempt), then submit a new recovery request with the updated payment method token.

Can I use Recurly Recover with existing Recurly Subscriptions customers?

Recurly Recover is not intended to work alongside Recurly Subscriptions — payment recovery is already included in your Recurly Subscriptions plan. For questions about which solution fits your needs, contact Recurly Sales or email [email protected].

Does the API response tell me when the next retry attempt will happen?

No. The Recover API response doesn't include a next-retry date or time. Track retry progress through webhook notifications instead — a new_dunning_event notification is delivered each time an invoice enters or hits a milestone in the retry schedule.

When do successful_payment, failed_payment, new_dunning_event, and closed_invoice fire?
  • successful_payment — delivered after a retry transaction is created and successfully collected by the gateway. Expected once per invoice.
  • failed_payment — delivered after a retry transaction is created and declined by the gateway. Multiple notifications can fire per invoice depending on the retry window.
  • new_dunning_event — delivered when an invoice enters or hits a milestone in the dunning retry schedule, per the schedule's configured event count.
  • closed_invoice — delivered when a previously past-due invoice moves to a final state, either by being paid or by exhausting the retry schedule.
What event sequence should I expect for a successful recovery versus an exhausted retry window?

You'll receive a new_dunning_event notification marking the schedule milestone, followed by a successful_payment or failed_payment notification confirming the outcome of that retry attempt. A closed_invoice notification is delivered for the invoice's final state, confirming that no further collection attempts will occur.

Which webhook event represents the authoritative final outcome?

closed_invoice. It includes a state parameter reflecting either collected/paid or failed/unpaid, and confirms that no other collection attempts will occur.

How do I correlate payment webhook events with the Recover invoice?

Use the invoice_id parameter — it's a shared identifier that links all related invoices and their transactions across both object types.

How should I handle webhook authenticity, duplicate deliveries, and out-of-order events?

Treat webhooks as triggers, not as the source of truth: verify they're genuine, ignore repeats, and always confirm state through an API query before acting.

  • Authenticity — verify the recurly-signature header (HMAC-SHA256) on every JSON webhook using your endpoint's secret key. You can optionally add HTTP Basic Auth and IP allowlisting.
  • Duplicates — Recurly resends on delivery failure, so expect repeats. Use the recurly-notification-id header, which stays identical across retries of the same notification, to detect and skip ones you've already processed. Reply with a 2XX within 5 seconds so Recurly doesn't retry unnecessarily.
  • Out-of-order events — never act on the payload alone. Use the webhook as a signal to call the Recurly API, compare the result to your local record, and update only if the API confirms a change. This handles delayed retries arriving after the resource has already changed.
How can I trigger and test all four webhook events in a sandbox?

Use Stripe test cards configured to trigger declines and successes. Testing both types in your sandbox triggers and delivers the corresponding notifications to your configured endpoint.

  • A successful Stripe test card triggers new_dunning_event, successful_payment, and closed_invoice.
  • A declining Stripe test card triggers new_dunning_event and failed_payment. If tested with a shortened retry window, closed_invoice also fires once the schedule reaches its final milestone and the invoice automatically updates to a failed state.
Who can create and assign roles in Recurly Recover?

Only a user with the Admin permission category can create roles and invite or assign users. Every user granted access — regardless of role — automatically has access to the Recover dashboard.




Did this page help you?