> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Simulate Paddle Retain interventions

Check that you've installed Paddle.js with Retain or the ProfitWell.js snippets correctly, and see for yourself what Retain looks like.

---

Once you've installed Retain, you can simulate Paddle Retain interventions by running some commands in your browser console.

This lets you check that Paddle Retain is installed correctly, and gives you a chance to see what customers see when Retain is in action.

## Before you begin

{% tabs %}
{% tab-item title="Paddle Billing" %}

{% callout type="warning" %}
Paddle Retain only works with live data. While you can initialize Paddle.js with Retain in sandbox accounts, Retain features aren't loaded there.
{% /callout %}

If you haven't already, include [Paddle.js with Retain](https://developer.paddle.com/paddle-js/include-paddlejs.md) in your web app and on your commercial website. [Paddle.js integrates with Retain](https://developer.paddle.com/concepts/retain/overview.md), so you don't have to include a separate Retain script.

You can simulate Retain interventions even if you haven't set up Retain yet. We recommend that you [set up Retain](https://developer.paddle.com/build/retain/set-up-retain-profitwell.md) and [configure payment recovery](https://developer.paddle.com/build/retain/configure-payment-recovery-dunning.md) before testing.

{% /tab-item %}
{% tab-item title="Other platforms" %}

Install the ProfitWell.js snippets on your web app and on your commercial website. See [install ProfitWell.js](https://www.paddle.com/help/profitwell-metrics/setup/install-engagement) on the Paddle Retain help center for more information.

We recommend that you [set up Retain](https://developer.paddle.com/build/retain/set-up-retain-profitwell.md) and [configure payment recovery](https://developer.paddle.com/build/retain/configure-payment-recovery-dunning.md) before testing.

{% /tab-item %}
{% /tabs %}

## Simulate payment recovery

You can simulate the payment recovery form that a customer sees when they click a Retain link and payment recovery notifications on a page where you've installed Paddle Retain.

{% tabs sync="retain-platform" %}
{% tab-item title="Paddle Billing" %}

1. Go to a page where you've installed Paddle.js.
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type `Paddle.Retain.demo({feature: 'paymentRecoveryInApp'})` to demo a payment recovery notification.
4. Type `Paddle.Retain.demo({feature: 'paymentRecovery'})` to demo a payment recovery form.

The form that appears uses Paddle [sandbox](https://developer.paddle.com/build/tools/sandbox.md), so you may use [test card details](https://developer.paddle.com/concepts/payment-methods/credit-debit-card#test-payment-method.md) to simulate a successful or failed payment.

{% /tab-item %}
{% tab-item title="Other platforms" %}

1. Go to a page where you've installed the ProfitWell.js snippets.
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type `profitwell('cq_demo', 'in_app')` to demo a payment recovery notification.
4. Type `profitwell('cq_demo', 'dunning')` to demo a payment recovery form.

The form that appears uses Paddle [sandbox](https://developer.paddle.com/build/tools/sandbox.md), so you may use [test card details](https://developer.paddle.com/concepts/payment-methods/credit-debit-card#test-payment-method.md) to simulate a successful or failed payment.

{% /tab-item %}
{% /tabs %}

## Simulate Cancellation Flows

You can simulate Cancellation Flows on a page where you've installed Paddle Retain.

{% tabs sync="retain-platform" %}
{% tab-item title="Paddle Billing" %}

1. Go to a page where you've [installed Paddle.js for Retain](https://developer.paddle.com/paddle-js/include-paddlejs#manual-initialize-paddlejs-retain.md).
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type and enter `Paddle.Retain.demo({feature: 'cancellationFlow'})`.

{% /tab-item %}
{% tab-item title="Other platforms" %}

1. Go to a page where you've [installed the ProfitWell.js snippets](https://developer.paddle.com/build/retain/set-up-retain-profitwell#connect-billing".md).
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type and enter `profitwell('cq_demo', 'cancellation_flow')`.

{% /tab-item %}
{% /tabs %}

## Simulate Term Optimization

You can simulate Term Optimization on a page where you've installed Paddle Retain.

{% tabs sync="retain-platform" %}
{% tab-item title="Paddle Billing" %}

1. Go to a page where you've installed Paddle.js.
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type `Paddle.Retain.demo({feature: 'termOptimizationInApp'})` to demo a Term Optimization notification.
4. Type `Paddle.Retain.demo({feature: 'termOptimization'})` to demo a Term Optimization form.

{% /tab-item %}
{% tab-item title="Other platforms" %}

1. Go to a page where you've installed the ProfitWell.js snippets.
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type `profitwell('cq_demo', 'plan_upgrade', 'notification')` to demo a Term Optimization notification.
4. Type `profitwell('cq_demo', 'plan_upgrade')` to demo a Term Optimization form.

{% /tab-item %}
{% /tabs %}

## Simulate other features

[Retain Reactivations](https://www.paddle.com/help/profitwell-metrics/retain/get-started/retain-reactivations) and [Retain Lockout](https://www.paddle.com/help/profitwell-metrics/retain/get-started/lockout) aren't available for all billing platforms supported by Paddle Retain.

If you use a platform that supports Retain Reactivations and Retain Lockout, you can simulate them on a page where you've installed Paddle Retain.

### Reactivations

1. Go to a page where you've installed the ProfitWell.js snippets.
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type `profitwell('cq_demo', 'reactivation')`.

### Lockout

1. Go to a page where you've installed the ProfitWell.js snippets.
2. Open your [browser console](https://developer.chrome.com/docs/devtools/console/).
3. Type `profitwell('cq_demo', 'lockout')`.