Abandoned Transaction Paywalls
Learn how to respond when a user starts a purchase, then cancels the transaction.
When a user opens the store purchase sheet and dismisses it before completing the purchase, Superwall tracks a transaction_abandon event. You can respond to that in two ways:
- Show another paywall with a
transaction_abandonplacement. - Keep the user on the current paywall and reveal a drawer, offer, or survey using the
didAbandonTransactionpaywall state.
Show another paywall instead
You can add transaction_abandon as a placement in a campaign. If a matching paywall is available, Superwall closes the current paywall and presents the new one.
Use this approach when the recovery experience should be a completely separate paywall, such as a dedicated discount page, a transaction-abandon survey template, or a later campaign with its own audience filters.
For campaign setup details and available audience filter parameters, see transaction_abandon.
Use didAbandonTransaction in the current paywall
Use the didAbandonTransaction state when you want the recovery offer to feel like part of the same paywall instead of closing one paywall and opening another.
didAbandonTransaction is a boolean state variable that Superwall manages for you. It starts as false when the paywall opens or when a new purchase begins. If the user cancels the store purchase sheet, Superwall sets it to true.
You can use that state to open a drawer after the abandoned transaction:
- 1
Add a drawer for the recovery offer
In the paywall editor, add a Drawer element. Put the follow-up offer, survey, or personalized message inside the drawer.
- 2
Bind the drawer to the transaction state
Select the drawer and set its open state to use a dynamic value. Use the
state.didAbandonTransactionvariable as the condition so the drawer opens when the value istrue. - 3
Add the follow-up purchase action
Add a button inside the drawer that starts the purchase you want to offer next. For example, you might show the same product with clearer copy, a discounted product, or a lower-priced alternative.
- 4
Publish and test the paywall
Preview the paywall on a device, tap the purchase button, then dismiss the App Store or Google Play purchase sheet. The drawer should appear on the same paywall after the transaction is abandoned.
If you need to edit or preview the drawer in the paywall editor, open the Variables panel and
temporarily set state.didAbandonTransaction to true.
Personalize the recovery offer
When a transaction is abandoned, Superwall also stores the abandoned product reference. This lets you personalize copy based on the product the user tried to buy.
For example, if the user attempted to purchase the annual product, you can use the abandoned product variables to show annual-specific copy or pricing inside the drawer:
Still interested in {{ products.abandoned.periodly }} access?You can use the same product fields available for your other product variables, such as products.abandoned.price, products.abandoned.periodly, or products.abandoned.trialPeriodText.
products.abandoned.* refers to the product on the current paywall that the user attempted to
purchase. Campaign audience filters use a separate abandoned_product_id value, which is the
store product identifier.
How is this guide?