deepwall
HomeContact UsLogin
  • Overview
  • System Components
  • Key Concepts
  • How It Works
  • Sign In
  • 🚀GETTING STARTED
  • App Registration
  • Configure In-App Products
  • Paywall Setup
    • Create A Paywall
    • Configure Look & Feel
    • Texts and Translations
  • Displaying Paywalls
    • Activate Default Displays
    • Create Targeted Displays
    • Display Priorities
    • Display Reports
    • Edit Displays
    • Display Rules
    • On Close Paywalls
  • Store Configuration
  • Attributions Configuration
  • App Status and Settings
  • ⚙️ SDK Framework
    • SDK Installation
      • iOS SDK
      • Android SDK
      • React Native SDK
      • Flutter SDK
      • Cordova SDK
      • Unity SDK
    • Using the SDKs
      • Initialization
      • Configuration
      • Listening SDK Events
      • Requesting Paywalls
      • Closing a Paywall
      • Validating Receipts
      • Making Purchases
      • Upgrades and Downgrades
      • Non-subscription Purchases
      • Restoring Purchases
      • Transition To Another Paywall
  • 🧪EXPERIMENTS
    • Experiments Overview
    • Create Experiments
    • Experiment Reports
    • Manual Traffic Allocation
    • Update Experiments
    • How Optimization Works?
  • 📦Integrations
    • Integrations Overview
    • Events List
    • Adjust
      • Get App Token
      • Create Adjust Events
    • AppsFlyer
      • Get Dev Key
    • Webhooks
    • OneSignal
  •  App Tracking (iOS 14.5)
    • App Tracking Overview
    • Configure In-app Actions
    • Create ATT Prompt
    • Displaying ATT Prompts
    • Experiments
  • 📈DASHBOARD
    • App Overview
    • Invite Members
    • Access Management
  • GUIDES
    • Apple
      • Getting the App Credentials
      • Setup In-App Products
      • Getting the Shared Secret
      • Server to server notifications
    • Google
      • Getting App Credentials
      • Setup In-App Products
      • Create Service Account Key
      • Developer Notifications
    • Huawei
      • Getting App Credentials
      • Setup In-App Products
      • Developer Notifications
  • 🔍Testing
    • Test Flows
    • Troubleshooting
    • Sandbox Testing
      • Apple App Store
      • Google Play Store
  • 🔗SDK Links
  • iOS SDK
  • Android SDK
  • React Native SDK
  • Flutter SDK
  • Cordova SDK
  • Unity SDK
Powered by GitBook
On this page

Was this helpful?

  1. ⚙️ SDK Framework
  2. Using the SDKs

Restoring Purchases

Learn how Deepwall manages restoring purchases

Deepwall SDKs restore in-app purchases for both subscriptions and non-subscription products, and validate user receipts for you without the need for additional code.

Whenever users restore from the displayed paywall, Deepwall gets latests receipt and validates.

Deepwall sends purchase events for you to handle and take necessary actions in your app workflow.

Using Restore Events

Deepwall SDK triggers restore events which gives you the ability to manage restore flow in your app.

Event for Restore Success

Whenever a restore is successful even there is active purchase or not, Deepwall sends a purchase success event.

iOS Event

Android Event

deepwallPaywallPurchaseSuccess

Parameters :

  • type: PloutosValidationType

  • result: PLPurchaseResponse

    • subscriptions: Array of SubscriptionItem

    • products: Array of ProductItem

PAYWALL_PURCHASE_SUCCESS

Parameters :

SubscriptionResponse

  • type: DeepwallReceiptValidationType

  • result: SubscriptionDetail

    • subscriptionArray of PurchaseSubscriptionItem

    • products: Array of String

Deepwall sends the deepwallPaywallPurchaseSuccess event for iOS and PAYWALL_PURCHASE_SUCCESSevent for Android whenever a restore is successfully and receipt has been verified. All purchased subscriptions and non-subscription products are returned as parameter.

You can recognize and handle the restore event by checking the validation type parameter:

RESTORE: If the validation type is RESTORE , this means a restore request is successfully validated. In this case, you can close the paywall if the user is a paid subscriber and also you can make the necessary updates for paid users in your app.

Event for Restore Fail

Whenever a restore fails due to an error, the Deepwall iOS SDK sends a restore fail event and the Deepwall Android SDK sends a purchase fail event.

iOS Event

Android Event

deepwallPaywallRestoreFailed

Parameters :

  • reason: RestoreFailedReason

    • .noReceipt

    • .failed

  • errorCode: String

  • errorText: String

  • isPaymentCancelled: Bool

PAYWALL_PURCHASE_FAILED

Parameters :

SubscriptionErrorResponse

  • type: DeepwallReceiptValidationType

  • result: DeepwallPurchaseFailedInfo

    • productCode: String

    • reason: String

    • errorCode: String

    • isPaymentCancelled: Bool

Deepwall sends the deepwallPaywallRestoreFailed event for iOS and PAYWALL_PURCHASE_FAILEDevent for Android whenever a restore request has failed due to an error.

Restore Cancelled by the User: If a restore is started and the user does not provide account credential and approve the restore, then the event is sent with isPaymentCancelled parameter TRUE.

Restore Failed Due To Error: If isPaymentCancelled is FALSE, this means restore has failed due to an error. Restore can fail because there is no receipt to validate or due to an error. Deepwall returns the error codes and text as a parameter.

You can check out the following guide to learn more about listening to all the SDK events and parameters:

You can also check out the following guide for troubleshooting the most common errors while setting up the in-app purchases and Deepwall SDK :

PreviousNon-subscription PurchasesNextTransition To Another Paywall

Last updated 4 years ago

Was this helpful?

Listening SDK Events
Troubleshooting