Skip to content

PayPerView Plugin

Daniel Neto edited this page Aug 18, 2026 · 11 revisions

PayPerView plugin

The Pay-Per-View plugin allows you to sell exclusive video content for a limited amount of time.


🎯 What Can You Do with PPV?

  • Set a price and expiration time for video access.
  • Allow free videos with ads and remove ads via payment.
  • Restrict access to only paid videos across the entire site.
  • Let content creators define PPV prices on their own videos (requires Stripe).
  • Automatically split earnings between the site admin and content creators.

💳 Payment Gateways

  • The plugin connects to the YPTWallet, supporting:

    • Stripe
    • PayPal
    • Any other gateway integrated via Wallet.

💰 How Are Payments Handled?

🔹 Option 1: All Payments Go to the Site Admin

  • Payments go directly to the site owner’s wallet.
  • If you want to pay content creators, they must request a withdrawal.
  • PayPal supports automatic withdrawals if configured.

🔹 Option 2: Payments Go Directly to Creators (Stripe Required)

  • Enable the usersCanSetPPV option.
  • Each user must provide their Stripe API key in their account.
  • Payments go directly to their Stripe account.
  • Note: Admin does not receive a cut in this mode.

🤝 PPV Revenue Split Between Admin and Creators (Optional)

You can configure automatic revenue sharing between the admin and content creators.

✅ Requirements

  • YPTWallet Plugin must be enabled.
  • PayPerView Plugin must be active.
  • Admin access is required to configure splits.

🛠️ Setup Guide

  1. Go to PPV plugin settings.
  2. Enable the following options:
    • usersCanCreatePPVPlans: allows users to create custom PPV plans.
    • usersCanSetPPV: lets users assign PPV plans to their own videos.
  3. Customize split labels if desired:
    • adminSplitlabel: e.g., "Site Share"
    • publisherSplitlabel: e.g., "Creator Share"
  4. When creating/editing a PPV Plan:
    • Set the Admin Split (e.g., 30)
    • Set the Publisher Split (e.g., 70)
    • The total must be 100%.

🔄 How Does It Work?

  • When a user purchases PPV, the full amount goes to the content creator.
  • The system runs transferAndSplitBalanceWithSiteOwner() from the Wallet plugin.
  • It automatically deducts the admin’s percentage from the creator’s balance.
  • Result: both parties get their share without manual processing.

⚙️ Additional Plugin Options

  • allowFreePlayWithAds: allows free playback with ads unless PPV is purchased.
  • onlyPlayVideosWithPayPerViewActive: blocks playback for videos without PPV.
  • onlyShowVideosWithPayPerViewActive: hides non-PPV videos from homepage.

🧑‍💻 How to Configure PPV

  1. Click the Edit button in the PPV plugin.

  2. Go to the PPV Plans tab Create or edit a plan:

    • Name
    • Price
    • Duration (in hours)
    • Admin and Creator split

    PPV Plan

  3. Go to the PPV Videos tab Select which videos should be pay-per-view by checking the appropriate plan and clicking Save.

    PPV Videos


🧪 How to Test

  • Purchase access to a video using a low price plan.
  • Check the Wallet balances of the admin and the content creator.
  • Confirm that the revenue split was processed.
  • Review transaction logs in the Wallet plugin.

Common questions

Why is the buy button missing? Check plugin/plan status, price, video assignment, payment method, wallet, dates, and whether the user already has access.

Why was payment recorded but playback denied? Reconcile the gateway event, wallet transaction, PPV purchase/access record, account, expiration, and video privacy.

Does PPV override a private/user-group restriction? Do not assume so. Test the complete combination with a normal purchaser account.

Clone this wiki locally