# Reduced Failed Payments with Success+

Source: https://docs.gocardless.com/docs/optimise/reduced-failed-payments-with-success-plus

# Reduce failed payments with Success+

## What is Success+ and what does it do?

Success+ is a payment intelligence and automation product that uses machine learning to manage and reduce payment failures. When a payment fails, Success+ retries it on the date it's most likely to succeed, recovering on average 71% of failed payments.

## What payments does Success+ retry?

Success+ will only retry payments that fail due to NSF (Non-sufficient funds). You can see a breakdown of reason codes below:

| Scheme   | Reason codes |
| -------- | ------------ |
| ACH      | R01, R09     |
| AutoGiro | TK82-1       |
| BACS     | 0            |
| BECS     | 6            |
| BECS_NZ  | AM04         |
| PAD      | 901          |
| SEPA     | AM04, MS03\* |

_\*MS03 only applies to the following countries: Austria, Belgium, Germany, Luxembourg and Slovakia_

## Good to Know

Please ensure you are listening and making actionable changes to the `late_failure_settled` event, as this payment may also be eligible to be retried through Success+. A late failure is not a final state, depending on the reason code as shown above.

For example, if a payment encounters a late failure due to non-sufficient funds, it is eligible to be retried through Success+.

## How to use Success+

### Enabling Success+

Success+ is enabled via the [GoCardless dashboard](https://manage.gocardless.com/success-plus/intelligent-retries).

> **Info:**
> You must be an admin user to enable Success+. If for any reason you are not able to enable the
>   feature through the GoCardless dashboard, you will be prompted to contact our Sales or Support
>   team.

1. Log into the GoCardless dashboard and navigate to the Success+ page. Or follow the [link here](https://manage.gocardless.com/success-plus/intelligent-retries).
2. Click **Turn on Success+**
3. Choose the scheme/schemes you want to enable Success+ for
4. Choose the configuration that suits your business. We offer a default preset with the highest chance of recovery.
5. Click **Enable retries for…** to enable Success+

## Using Success+ through API

As mentioned above, the initial configuration for Success+ is done via the GoCardless dashboard, even if your business uses GoCardless via API.

> **Info:**
> If you are a Partner, you will need to track all events associated with a payment to provide
>   clarity around the current status and ultimate outcome. For example, tracking failed payments for
>   your customers and displaying a UI that showcases failed payments within a given period on the
>   customer profile. This information will be insightful for our joint customers in understanding
>   failed payment activity.

API merchants do have the additional ability to decide whether Success+ should be applied on each payment they submit, via a boolean flag. This is useful if your business wants to create its own rules about when Success+ should apply to different customers or payment types.

### The Success+ flag

The flag `retry_if_possible` is used to control whether Success+ is enabled on a payment. The following payment types support this boolean flag:

- Individual payments
- Instalment schedules
- Subscriptions

For API users enabling Success+, the flag is mandatory and by default, the flag will be set to `false`. If you are enabling Success+ as a partner, the flag will automatically be set to `true` unless specified otherwise.

### Using Success+ with individual payments

_Creating payments_

When creating a payment, set `retry_if_possible` to `true`. This will enable intelligent retries if the payment is eligible.

_Updating payments_

If a payment has been created with `retry_if_possible` set to `true`, then it can be [updated](/docs/api-reference/payment) to `false`. This will prevent the payment from being automatically retried in the event of a failure.

> **Info:**
> The API currently only allows the flag to be updated to false. Hence for a payment which has been
>   already created it is not possible to set this flag to true.

```http
POST https://api.gocardless.com/payments HTTP/1.1
Content-Type: application/json

}

PUT https://api.gocardless.com/payments/PM123 HTTP/1.1
Content-Type: application/json

}
```

### Using Success+ with Instalment Schedules

When creating an [instalment schedule](/docs/api-reference/instalment-schedule#create-with-schedule) set `retry_if_possible` to true to ensure that all instalment payments created are automatically retried upon failure.

```http
POST https://api.gocardless.com/instalment_schedules HTTP/1.1
Content-Type: application/json

```

### Using Success+ with Subscriptions

When creating a [subscription](/docs/api-reference/subscription#create-a-subscription) set `retry_if_possible` to true to ensure that all payments created for the subscription are retried automatically upon failure.

```http
POST https://api.gocardless.com/subscriptions HTTP/1.1
Content-Type: application/json

```

## Handling Failures

On payment failure the `failed` [event](/docs/api-reference/events/payments) will always be sent. If the payment will be automatically retried the field `will_attempt_retry` will be `true`.

When a payment is automatically retried it will trigger a `resubmission_requested` event just like any other type of retry.

> **Warning:**
> When `will_attempt_retry` is `true`, GoCardless will automatically retry the payment. Please do
>   not attempt to collect the payment from the customer yourself, as this can lead to them being
>   double charged.

```http
GET https://api.gocardless.com/events/EV123 HTTP/1.1

HTTP/1.1 200 (OK)
Content-Type: application/json
,
    "metadata": ,
    "links": 
  }
}
```

### What to do if a payment is going to be retried

- After any `payment_failed` event with `will_attempt_retry` set to true, we will send a `payment:resubmission_requested` event.
- You can treat this exactly the same as a manual user-triggered retry - the payment will be re-attempted on the new `charge_date` and will go through the normal payment flow.

### How to know which payments will be retried

- You can use the `will_attempt_retry` flag on the `payment:failed` event to identify payments which will be intelligently retried.
- If the flag is set to `true`, then the payment **will** be intelligently retried.
- If set to `false`, the payment **will not** be retried and then you can [retry the payment manually](/docs/api-reference/payment#retry-a-payment).

### How to stop a payment being retried

- To stop a payment from being retried, call the [update payment endpoint](/docs/api-reference/payment#update-a-payment) with `retry_if_possible` set to `false`
- While the initial payment will still continue, it will **not** be automatically retried.
- The payment status must be in "pending_submission" for it to be updated successfully

### When a payment will be retried

> **Warning:**
> The criteria below are subject to change and should not be relied upon. Use the
>   `will_attempt_retry` field in the `failed` event to know for sure if a payment will be retried.

The `retry_if_possible` field does not guarantee the payment will be retried on failure. A payment will be retried if the following conditions are met:

- Intelligent retries for the scheme has been enabled on the [settings page](https://manage.gocardless.com/success-plus).
- The payment has field `retry_if_possible` set to true.
- The payment has failed due to insufficient funds.
- The number of payment failures is lesser than the number of retries configured in the intelligent retries settings page.
- The subsequent retry can be confirmed within the retry window configured in the intelligent retries settings page.

## What's next?

  
#### [Handling Webhooks](/docs/getting-started/stay-up-to-date-with-webhooks)

Learn how to receive and process webhook events to stay up to date with payment status changes.

  
#### [Payments API Reference](/docs/api-reference/payment)

Explore the full Payments API reference to manage payments, retries, and updates.