Search

Are you looking for test card numbers?

Would you like to contact support?

Online-payment icon

Auto Rescue

Automatically retry shopper-not-present transactions when they are refused.

Adyen's Auto Rescue automatically retries declined shopper-not-present transactions such as subscription renewals. It uses smart logic to decide which declined payments can succeed when retried later, and performs these retries at optimal times.

When you submit a payment that is refused, this could be due to many reasons. In some cases, for example when the shopper's account has insufficient funds, the payment might still succeed when submitted again at a later point. In other scenarios, for example when the cardholder's account has been closed, the decline is permanent.

Auto Rescue schedules retries for declined payments that have a chance of succeeding. It may take several retry attempts to rescue a payment. These attempts occur within a rescue window.

Here we describe how you:

  1. Enable Auto Rescue.
  2. Receive updates on the Auto Rescue process.

We also explain how you can:

Before you begin

Before using Auto Rescue, make sure you have set up notification webhooks. We use these to update you on the Auto Rescue process, including:

  • The result of a retry attempt.
  • Whether another retry attempt has been scheduled.
  • The rescue process ending.

Step 1: Enable Auto Rescue

You can enable Auto Rescue at either:

  • Account level: Auto Rescue is used on all eligible payments.
  • Transaction level: You choose when Auto Rescue can be used for a payment, using the autoRescue flag.

Enable at account level

To enable Auto Rescue for all payments, either contact our Support Team or your Adyen Account Manager.

Once enabled, Auto Rescue is enabled for payments that have:

  • The shopperInteraction ContAuth.
  • A value greater than 0.

If you enable Auto Rescue at account level, a rescue window of one calendar month is used. If you'd prefer to use another rescue window you will need to enable Auto Rescue at the transaction level.

You receive updates to the Auto Rescue process in notification webhooks.

Enable at transaction level

To enable Auto Rescue on a transaction level, either contact our Support Team, or your Adyen Account Manager.

Once enabled, you can use the autoRescue flag in a payment request to enable Auto Rescue. In the payment request, you also need to provide a unique merchantOrderReference. This should represent a specific billing cycle or subscription, and will appear in any Auto Rescue updates or reports.

You use the merchantOrderReference to connect any Auto Rescue retry attempts back to a payment request.

To enable Auto Rescue for a transaction:

  1. Make a payment request, and additionally specify:

    • shopperInteraction: ContAuth
    • autoRescuetrue
    • maxDaysToRescue: The rescue window, in days. You can specify between 1 and 48 days. We recommend using a rescue window of one calendar month.
    • reference: Your unique reference for this payment request.
    • merchantOrderReference: Your unique order reference. You may want to use, for example, a concatenation of a unique shopper reference and the transaction date.

    The example below shows how you would flag a shopper-not-present payment for Auto Rescue with /payments. If this payment is Refused, Auto Rescue will automatically retry this payment for a maximum of 40 days.

    {
       "paymentMethod":{
          "type":"scheme",
          "storedPaymentMethodId":"7218395820498475"
       },
       "amount":{
          "currency":"USD",
          "value":1000
       },
       "returnUrl":"https://your-company.com/...",
       "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
       "recurringProcessingModel":"Subscription",
       "shopperInteraction":"ContAuth",
       "reference":"Trans987654321",
       "shopperReference":"YOUR_UNIQUE_SHOPPER_ID",
       "merchantOrderReference":"Cust12345_Nov19",
       "additionalData":{
          "autoRescue":"true",
          "maxDaysToRescue":"40"
       }
    }

  1. You receive a payment response. If the payment is refused this contains:

    • resultCodeRefused
    • refusalReason: The reason the payment was refused. For more information, see Refusal reasons.
    • retry.rescueScheduled: Indicates whether Auto Rescue will attempt to rescue the payment:

      • true: Auto Rescue will attempt to rescue the payment. You receive updates on the rescue process in notification webhooks.

      • false: Auto Rescue will not attempt to rescue the payment. This happens when a payment cannot be rescued. For example, account closure or fraud.
    • retry.rescueReference: Unique Auto Rescue reference for this payment.
      You can use this to cancel the Auto Rescue process if, for example, the shopper provides you with a new credit card number, or cancels their subscription.

    The example response below is for a payment was Refused. In this response, retry.rescueScheduled is set to true, indicating that Auto Rescue will attempt to rescue this payment.

    {
        "pspReference":"812872049382471H",
        "resultCode":"Refused",
        "refusalReason":"NOT_ENOUGH_BALANCE",
        "additionalData":{
            "retry.rescueScheduled":"true",
            "retry.rescueReference":"865497581465325B"
        }
    }

You receive updates to the Auto Rescue process in notification webhooks.

Step 2: Receive Auto Rescue updates

To update you on the Auto Rescue process we send you notification webhooks. We send you a notification when:

Before using Auto Rescue for live payments, we recommend that you test how your integration handles these notifications.

Retry attempt successful

If a retry attempt is successful, you receive a notification with:

  • eventCode: AUTHORISATION
  • success: true
  • pspReference: Adyen's unique reference for the successful retry attempt.
  • merchantOrderReference: Unique order reference that you provided in the payment request.

The example below is for an retry attempt that was successful.

{
   "live":"false",
   "notificationItems":[
      {
         "NotificationRequestItem":{
            "additionalData":{
               "retry.rescueScheduled":"false",
               "retry.rescueReference":"88HH88HH88HH88HH",
               "retry.orderAttemptNumber":3,
               "merchantOrderReference":"Cust12345_Nov19",
               ...
            },
            "pspReference":"814987049386784P",
            "eventCode":"AUTHORISATION",
            "success":"true",
            ...
         }
      }
   ]
}

You can view how much revenue has been recovered with Auto Rescue in your Customer Area, under Performance > RevenueAccelerate.

If you use manual capture, you need to capture each rescued payment to transfer it to your account.

Retry attempt unsuccessful

If a retry attempt is unsuccessful, you receive a notification with:

  • eventCodeAUTHORISATION
  • success: false
  • merchantOrderReference: Unique order reference that you provided in the payment request.
  • retry.rescueScheduled: Indicates whether Auto Rescue will attempt the payment again:

The example below is for a retry attempt that was unsuccessful (success is false). Another retry attempt has been scheduled (retry.rescueScheduled is true).

{
   "live":"false",
   "notificationItems": [
      {
         "NotificationRequestItem":{
            "additionalData":{
               "retry.rescueScheduled":"true",
               "retry.rescueReference": "88HH88HH88HH88HH",
               "retry.orderAttemptNumber": 1,
               "merchantOrderReference":"Cust12345_Nov19",
               ...
            },
            "pspReference":"804938149876784D",
            "eventCode":"AUTHORISATION",
            "success":"false",
            ...
         }
      }
   ]
}

Rescue process ended

When the rescue process ends we send you a notification with:

  • eventCodeAUTORESCUE
  • success: Indicates whether the rescue process was successful:

    • true: The rescue process was successful.
    • false: The rescue process was unsuccessful.
  • merchantOrderReference: Unique order reference you provided in the payment request.
  • reason: If the rescue process was unsuccessful, this indicates why the payment could not be rescued:
    • retryWindowHasElapsed: The rescue window expired.
    • maxRetryAttemptsReached: The maximum number of retry attempts was made.
    • fraudDecline: The retry was rejected due to fraud.
    • internalError: An internal error occurred while retrying the payment.

The example below is a notification indicating that a payment could not be rescued. This is because the maximum number of retries has been reached (reason is maxRetryAttemptsReached).

{
   "live":"false",
   "notificationItems":[
      {
         "NotificationRequestItem":{
            "additionalData":{
               "retry.rescueReference":"88HH88HH88HH88HH",
               "merchantOrderReference":"Cust12345_Nov19"
            },
            "amount":{
               "currency":"USD",
               "value":1000
            },
            "eventCode":"AUTORESCUE",
            "eventDate":"2019-11-11T12:00:01+01:00",
            "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
            "success":"false",
            "originalReference":"812872049382471H",
            "pspReference":"867848149870493R",
            "reason":"maxRetryAttemptsReached",
            ...
         }
      }
   ]
}

Cancel Auto Rescue process

While a payment is in the Auto Rescue process, your customer may provide you with a new payment method, or cancel their subscription. In these scenarios, you should cancel the Auto Rescue process for the refused payment.

To cancel the Auto Rescue process:

  1. Make a /cancel request, specifying: 

    • originalReference: The rescueReference that you received in the payment response.
    • cancellationType: autoRescue

    The example below shows how you would cancel the Auto Rescue process for a payment with a rescueReference of 865497581465325B.

    {
        "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
        "originalReference":"865497581465325B",
        "additionalData":{
            "cancellationType":"autoRescue"
        }
    } 
  2. You receive a /cancel response containing:

    • response: [cancel-received]
    • pspReference: Our unique reference for your /cancel request.

      This is different from the pspReference you received for the payment request.

    {
        "response":"[cancel-received]",
        "pspReference":"8412534564722331"
    }

    Once we have processed your cancel request, you receive a notification with:

    • eventCodeCANCEL_AUTORESCUE
    • success: Indicates whether your request to cancel the rescue process was successful.
    • merchantOrderReference: Unique order reference that you provided in the payment request.

    {
       "live":"false",
       "notificationItems":[
          {
             "NotificationRequestItem":{
                "additionalData":{
                   "merchantOrderReference":"Cust12345_Nov19"
                }, 
                "amount":{
                   "currency":"USD",
                   "value":1000
                },
                "eventCode":"CANCEL_AUTORESCUE",
                "eventDate": "2019-04-05T09:08:05+01:00",
                "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
                "success":"true",
                "originalReference":"88HH88HH88HH88HH",
                "pspReference":"77GG77GG77GG77GG",  
                ...
             }
          }
       ]
    }

Test and go live Auto Rescue

Before flagging live payments for Auto Rescue, we recommend that you test how your integration handles scenarios involving Auto Rescue updates.

To simulate scenarios involving Auto Rescue updates:

  1. Make a test payment that is flagged for Auto Rescue. In the payment request, additionally provide:

    • autoRescueScenario: Set this to the scenario you want to test:
      • AutoRescueSuccessfulFirst: The payment is refused; the first retry attempt is successful.
      • AutoRescueSuccessfulSecond: The payment and first retry attempt are refused; the second retry attempt is successful.
      • AutoRescueFailed: The payment and all retry attempts are refused.
      • AutoRescueFraud: The payment is refused because of fraud; there will be no retry attempts.

    The example below shows how you would test a scenario with /payments where the second retry attempt is successful:

    {
        "paymentMethod":{
            "type":"scheme",
            "storedPaymentMethodId":"7218395820498476"
        },
        "amount":{
            "currency":"USD",
            "value":1000
        },
        "returnUrl":"https://your-company.com/...",
        "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
        "recurringProcessingModel":"Subscription",
        "shopperInteraction":"ContAuth",
        "reference":"Trans987654321",
        "shopperReference":"YOUR_UNIQUE_SHOPPER_ID",
        "merchantOrderReference":"SecondRetryTest",
        "additionalData":{
            "autoRescue":"true",
            "maxDaysToRescue":"40",
            "autoRescueScenario":"AutoRescueSuccessfulSecond"
        }
    }
  2. You receive Auto Rescue updates corresponding to the scenario you are testing.
    If this scenario involves multiple retry attempts, these Auto Rescue updates will occur several minutes apart.

Auto Rescue reports

Each Auto Rescue retry attempt is a separate transaction, and generates a unique pspReference. You can find a record of Auto Rescue attempts in the Received payment detail report.

To connect an Auto Rescue retry attempt to a payment request, use the value in the Merchant Order Reference column. This corresponds to the merchantOrderReferrence you provided in the payment request.

If you did not provide a merchantOrderReference in the payment request, we automatically populate the Merchant Order Reference column with the Psp Reference of the payment request.

Example

The following example represents two payment requests. Once has the merchantOrderReference A1, and the other A2.

For the payment request:

  • A1: The payment was rescued on the 1st retry attempt.
  • A2: The payment was rescued on the 3rd retry attempt.
Transaction Psp Reference Merchant Order Reference Record Type
November monthly subscription payment 812872049382471H A1 Refused
1st retry attempt 814987049386784P A1 Authorised
December monthly subscription payment 812872049382471H A2 Refused
1st retry attempt 804938149876784D A2 Refused
2nd retry attempt 804938149950514L A2 Refused
3rd retry attempt 814987049986784P A2 Authorised

See also