Requesting Paywalls
Instructions for displaying a paywall via Deepwall SDKs
Last updated
Instructions for displaying a paywall via Deepwall SDKs
Last updated
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:
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.
Replace {ACTION_KEY}
with one of the action keys created in the Deepwall management console for your app.
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.
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.
The Deepwall SDK triggers various events while displaying paywalls, which gives you the ability to take the necessary actions in your app workflow.
Deepwall sends the deepwallPaywallRequested
event for iOS and PAYWALL_REQUESTED
event 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.
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.
Deepwall sends the deepwallPaywallOpened
event for iOS and PAYWALL_OPENED
event for Android whenever a paywall is opened successfully.
Deepwall sends the deepwallPaywallActionShowDisabled
event 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 :
Deepwall sends the deepwallPaywallNotOpened
event 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.
Deepwall sends the deepwallPaywallResponseFailure
event 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:
iOS Event
Android Event
deepwallPaywallRequested
Parameters :
N/A
PAYWALL_REQUESTED
Parameters :
N/A
iOS Event
Android Event
deepwallPaywallResponseReceived
Parameters :
N/A
PAYWALL_RESPONSE_RECEIVED
Parameters :
N/A
iOS Event
Android Event
deepwallPaywallOpened
Parameters :
pageId: Int
PAYWALL_OPENED
Parameters :
PaywallOpenedInfo
pageId: Int
iOS Event
Android Event
deepwallPaywallActionShowDisabled
Parameters :
pageId: Int
DO_NOT_SHOW
Parameters :
PaywallActionShowDisabledInfo
pageId: Int
iOS Event
Android Event
deepwallPaywallNotOpened
Parameters :
pageId: Int
PAYWALL_NOT_OPENED
Parameters :
N/A
iOS Event
Android Event
deepwallPaywallResponseFailure
Parameters :
errorCode: String
reason: String
PAYWALL_RESPONSE_FAILURE
Parameters :
PaywallFailureResponse
errorCode: String
reason: String
Error Code
Description
10101
Server response is invalid
10102
Products empty
10201
Gzip data is invalid
10202
String data is invalid
10203
Available products empty
10204
Available products invalid