Requesting Paywalls

Instructions for displaying a paywall via Deepwall SDKs

You can raise a paywall in your app using Deepwall SDK without the need for UI development or the need for storing product codes or prices on the client app.

Before starting to display a paywall, you need to activate a display on the Deepwall management console.

If you have not activated your displays yet, please refer to the guide for displaying paywalls:

Request Paywall

After you have initialized and configured the SDK with user properties, you are ready to request a paywall anywhere in your app.

Use the request paywall method to raise a paywall in your app and send the action key.

// SomeUIViewController.swift

DeepWall.shared.requestPaywall(action: "{ACTION_KEY}", in: self)

Replace {ACTION_KEY} with one of the action keys created in the Deepwall management console for your app.

In-app Action Key

In-app actions in Deepwall are the checkpoints where you want to raise a paywall in your app which can be a startup action if you want to raise a paywall after the app launch or it can be an action triggered to unlock premium content. The number of in-app actions depends on the app.

You need to replace {ACTION_KEY} with one of your app-specific action keys created in the Deepwall management console while you are requesting a paywall. You can get those keys from the Deepwall management console, from the App Settings page on the App Settings tab. You can also add new in-app actions anytime you need.

Don't forget to activate default displays for the newly added in-app actions after you have added new in-app actions.

Sending Extra Data

Depending on the theme used, some paywalls can receive extra parameters from the app layer and can display/hide some data or actions for users. Extra data is used for sending parameters in such cases.

// SomeUIViewController.swift

let deepwallExtraData: DeepWallExtraDataType = [
    "some": "value"
]
DeepWall.shared.requestPaywall(action: "{ACTION_KEY}", in: self, extraData: deepwallExtraData)

Using Paywall Display Events

The Deepwall SDK triggers various events while displaying paywalls, which gives you the ability to take the necessary actions in your app workflow.

Event for Paywall Requests

Deepwall sends the deepwallPaywallRequested event for iOS and PAYWALL_REQUESTEDevent for Android whenever a paywall is requested.

We recommend you use this event to start displaying a loading indicator while the paywall is opening which can take 1-1,5 secs or more depending on the connection speed.

Event for Paywall Response Receive

Deepwall sends the deepwallPaywallResponseReceived event for iOS and PAYWALL_RESPONSE_RECEIVED event for Android whenever a paywall display success or failure response is received after a paywall request.

We recommend you to use this event for hiding the loading indicator if you have started to display it when a paywall is requested.

Event for Paywall Open

Deepwall sends the deepwallPaywallOpenedevent for iOS and PAYWALL_OPENED event for Android whenever a paywall is opened successfully.

Event for Disabled Paywall Display

Deepwall sends the deepwallPaywallActionShowDisabledevent for iOS and DO_NOT_SHOW event for Android whenever a paywall cannot be displayed due to display rules or paywall display is set as None in the Deepwall management console.

None selection means you don't want to display a paywall for the selected action and/or display type. If this is not you want, you need to check related display settings and set a paywall to display for first or next displays.

A paywall may not be displayed due to enabled display rules and paywall display frequency or maximum display count limitation.

See the guide for more information about display rules :

Events for Duplicated Paywall Requests

Deepwall sends the deepwallPaywallNotOpenedevent for iOS and PAYWALL_NOT_OPENED event for Android whenever a paywall cannot be displayed due to duplicated requests which means this paywall request has been sent while a previous request is being processed.

Important Note

If this event is triggered, you should check your code and rearrange it so that it will not send a second paywall request before a response is received for the previous request.

Event for Paywall Response Failure

Deepwall sends the deepwallPaywallResponseFailureevent for iOS and PAYWALL_RESPONSE_FAILURE event for Android whenever a paywall display has failed due to an error.

The Deepwall SDK provides error codes and reasons to help you locate and eliminate issues.

You can check out the following guide to learn 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:

Last updated