For AI agents and LLMs: a structured documentation index is available at /llms.txt. Every page has a Markdown sibling — append .md to any URL.

Skip to content
Docs

Paddle.Retain.demo()

Use to demo Retain functionality.

Use Paddle.Retain.demo() to demo Paddle Retain functionality.

Typically used by typing Paddle.Retain.demo({feature: 'featureName'}) directly into the browser console. You can simulate payment recovery and dunning, Cancellation Flows, and Term Optimization.

Paddle Retain only works on live accounts

Paddle Retain only works with live data. While you can initialize Paddle.js with Retain in sandbox accounts, Retain features aren't loaded there.

This method is for Paddle Billing only. If you use Paddle Retain with another billing platform, use the profitwell method in the ProfitWell.js snippet instead. To learn more, see Test Paddle Retain

Parameters

featurestring
Paddle Retain feature to simulate. Features use sample data.
Values
  • cancellationFlow
    Demo Retain Cancellation Flows. Simulates a complete cancellation flow.
  • paymentRecovery
    Demo Retain Payment Recovery. Simulates the payment form that a customer sees when they click on a link in a payment recovery email. Use sandbox test card details to test a payment.
  • paymentRecoveryInApp
    Demo an in-app notification for Retain Payment Recovery. Simulates an in-app notification that prompts a customer to update their payment method.
  • termOptimization
    Demo Retain Term Optimization. Simulates the modal that a customer sees when they click on a link in a Term Optimization email.
  • termOptimizationInApp
    Demo an in-app notification for Retain Term Optimization. Simulates an in-app notification that prompts a customer to upgrade their plan.

Examples

This example simulates a cancellation flow. Type this directly into your browser console to demo Retain Cancellation Flows:

JavaScript
Paddle.Retain.demo({feature: 'cancellationFlow'})

This example simulates the payment form that a customer sees when they click on a link in a payment recovery email. Type this directly into your browser console to demo Retain Payment Recovery:

JavaScript
Paddle.Retain.demo({feature: 'paymentRecovery'})

This example simulates an in-app notification that prompts a customer to update their payment method. Type this directly into your browser console to demo an in-app notification for Retain Payment Recovery:

JavaScript
Paddle.Retain.demo({feature: 'paymentRecoveryInApp'})

This example simulates the modal that a customer sees when they click on a link in a Term Optimization email. Type this directly into your browser console to demo Retain Term Optimization:

JavaScript
Paddle.Retain.demo({feature: 'termOptimization'})

This example simulates an in-app notification that prompts a customer to upgrade their plan. Type this directly into your browser console to demo an in-app notification for Retain Term Optimization:

JavaScript
Paddle.Retain.demo({feature: 'termOptimizationInApp'})

To learn more, see Test Paddle Retain

Was this page helpful?