You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/paywall3.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,7 @@ var paywall = new InplayerPaywall('c6f4002f-7415-4eb6-ab03-72b0f7aff0e8',
165
165
</script>
166
166
```
167
167
168
+
168
169
### Additional Asset Options
169
170
170
171
Apart from the main asset options, there are additional **CSS/JS scripts** available to be imported to the player being loaded after purchase, along withquery parameters meant for **player customisation.** More precisely, these scripts are given to the player being loaded after a purchase is completed. For this reason, they should be distinguished from the general scripts included in the asset embed process.
@@ -267,6 +268,7 @@ var paywall = new InplayerPaywall('c6f4002f-7415-4eb6-ab03-72b0f7aff0e8',
267
268
</script>
268
269
```
269
270
271
+
270
272
### Additional Global Options
271
273
272
274
Depending on your preference, there are additional global options to include in your embed code as to customize the assets to your liking. You get to set up the language of your asset(s) via the paywall `language` option (English is the default one), you get to decide whether you want your user menu or the modal header logo displayed or hidden, the former via the `hideUserMenu` and the latter via the `hideLogo` option as in the example below:
@@ -361,6 +363,10 @@ To gain a better understanding of all paywall options mentioned above (both per
361
363
|`brandingId`| Sets a global branding theme for all assets on a page. | Number | Global option |
362
364
|`registerFirst`| If `true`, it sets the 'Register screen' as default, as opposed to the 'Login screen'; optional. | Boolean(set `false` by default) | Global option |
363
365
|`ssoDomain`| By providing a valid `ssoDomain`, the SSO feature will be enabled; optional. | String | Global option |
366
+
|`userMenuPosition`| The user menu can be set up to be positioned on the `left` or on the `right`. By default it is positioned on the right. | String | Global option |
367
+
|`hideBuyGiftOption`| Disabling the `buy as a gift` option on the 'Price Options Screen'. | Boolean(set `false` by default) | Asset option |
368
+
|`hideGiftFlowAfterPurchase`| Disabling the `buy as a gift` option on the screen after successful purchase. | Boolean(set `false` by default) | Asset option |
369
+
364
370
365
371
## Paywall Methods
366
372
@@ -467,6 +473,15 @@ Example:
467
473
paywall.showDonationsFlow(assetId);
468
474
```
469
475
476
+
### `showGiftsFlow`
477
+
478
+
This method initiates the gifts flow for the provided `assetId`.
479
+
480
+
Example:
481
+
482
+
```js
483
+
paywall.showGiftsFlow(assetId);
484
+
```
470
485
471
486
### Asset Manipulation Methods
472
487
@@ -711,9 +726,10 @@ Here is the list of the HTML classes that can be used for creating each of the s
711
726
|`inplayer-paywall-change-pass`| Invokes the 'Change Password' screen |
712
727
|`inplayer-paywall-purchases`| Invokes the 'My Purchases' paywall screen where an end-user can see the list of payments they have completed |
713
728
|`inplayer-paywall-donations`| Invokes the donations flow for the provided asset. See below for example of usage |
729
+
|`inplayer-paywall-gifts`| Invokes the gifts flow for the provided asset. See below for example of usage |
714
730
715
731
716
-
The HTML class**inplayer-paywall-donations**can be added to any HTML element. The `asset-id` represents the ID of a specific InPlayer asset. Usage example:
732
+
The HTML classes**inplayer-paywall-donations**, **inplayer-paywall-gifts**can be added to any HTML element. The `asset-id` represents the ID of a specific InPlayer asset. Usage example for donations:
@@ -722,6 +738,14 @@ The HTML class **inplayer-paywall-donations** can be added to any HTML element.
722
738
When clicking on this element, the donations flow for the provided asset is initiated by opening the donation options screen.
723
739
The donation options screen lists all donation options added to the asset that is being accessed. After selecting a donation option the end-user can proceed with the donation payment.
When clicking on this element, the gift flow for the provided asset is initiated by opening the receivers email address screen. After entering the receivers email address the end-user can proceed with the gift payment.
748
+
725
749
The advantage of using these classes is that they come with a built-in logic for displaying and hiding the elements, depending on whether the user is authenticated or not. For example, the HTML element with the **inplayer-paywall-logout class** will only be shown when the user is authenticated.
0 commit comments