WP Manifestindependent plugin directory
manifest / ecommerce / wp-paypass

WP PayPass

Pay-per-article monetization plugin for WordPress

by Roshan Singh · github.com/roshan-singh001/wp-paypass

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/roshan-singh001/wp-paypass/archive/refs/heads/main.zip

Pay-per-article monetization plugin for WordPress

WP PayPass is a WordPress plugin that enables publishers to monetize individual articles by placing selected content behind a payment requirement.

The plugin is designed around a pay-per-article model, allowing readers to unlock premium content through a payment flow instead of requiring a full subscription.

The project currently integrates with PhonePe for payment processing and uses webhooks to handle payment status updates.

🚧 Status: Active development More payment gateways, UI improvements, configuration options, and monetization features are planned.


✨ Features

  • 💳 Pay-per-article payments

    • Require readers to make a payment before accessing premium content.
    • Configure individual articles as paid/premium content.
  • 🔗 PhonePe Payment Integration

    • Initiate payment through PhonePe.
    • Handle payment responses.
    • Process payment status updates through webhooks.
  • 🪝 Webhook-based Payment Verification

    • Receive asynchronous payment status updates.
    • Process successful payment notifications.
    • Helps ensure article access is granted based on the payment status rather than only the frontend response.
  • 🔐 Content Access Control

    • Restrict premium article content.
    • Allow users to access content after successful payment.
  • ⚙️ WordPress Integration

    • Works within the WordPress ecosystem.
    • Uses WordPress hooks, APIs, and database functionality.
    • Designed to integrate with existing WordPress websites.
  • 🛠️ Admin Configuration

    • Configure plugin/payment-related settings from the WordPress admin dashboard.

🧠 How It Works

The basic payment flow is:

Reader visits premium article
            │
            ▼
   Premium content detected
            │
            ▼
      Payment required
            │
            ▼
   Reader starts payment
            │
            ▼
      PhonePe Checkout
            │
            ▼
      Payment completed
            │
            ▼
      PhonePe Webhook
            │
            ▼
   Payment status verified
            │
            ▼
     Article unlocked

The webhook is an important part of the system because payment completion can happen asynchronously.

Instead of relying solely on the browser's response, the plugin can process the payment provider's server-to-server notification and update the payment/access state accordingly.


🏗️ Architecture

The plugin is structured around the following components:

WordPress
│
├── Admin
│   └── Plugin configuration
│
├── Article / Content Layer
│   └── Premium content detection
│
├── Payment Layer
│   └── PhonePe integration
│
├── Webhook Handler
│   └── Payment status processing
│
├── Access Control
│   └── Unlock article after successful payment
│
└── Database
    └── Payment / access-related data

🛠️ Tech Stack

Backend

  • PHP
  • WordPress
  • MySQL

Payment & APIs

  • PhonePe Payment Gateway
  • REST APIs
  • Webhooks

Frontend

  • HTML
  • CSS
  • JavaScript
  • WordPress Admin UI

Development

  • Git
  • GitHub
  • WordPress Local Development

📦 Installation

1. Clone the repository

git clone https://github.com/Roshan-Singh001/wp-paypass.git

2. Move the plugin into WordPress

Copy the plugin directory into:

wp-content/plugins/

For example:

wp-content/
└── plugins/
    └── wp-paypass/

3. Activate the plugin

From the WordPress dashboard:

Plugins → Installed Plugins → WP PayPass → Activate

4. Configure the plugin

Open the WP PayPass settings from the WordPress admin dashboard and configure the required payment credentials/settings.

5. Configure the webhook

Configure the webhook endpoint provided by the plugin in the corresponding PhonePe merchant/payment configuration.

Important: Never commit real merchant credentials, API keys, authentication tokens, webhook secrets, or other sensitive information to the repository.


🔑 Configuration

WP PayPass requires payment gateway configuration before processing real transactions.

Typical configuration may include:

Merchant / Client ID
API credentials
Environment
Webhook configuration
Payment settings

For development, use the payment provider's supported sandbox/test environment whenever available.


💰 Payment Flow

A simplified payment lifecycle looks like this:

1. Reader selects a premium article
              ↓
2. WP PayPass creates/initiates payment
              ↓
3. Reader completes payment
              ↓
4. Payment provider processes transaction
              ↓
5. Webhook is sent to WordPress
              ↓
6. WP PayPass processes payment status
              ↓
7. Successful payment is recorded
              ↓
8. Reader receives access to the article

🔐 Security Considerations

Because WP PayPass handles payment-related workflows, security is an important part of the project.

The project aims to follow WordPress security practices including:

  • Sanitizing user input
  • Validating incoming data
  • Escaping output
  • Using WordPress APIs where appropriate
  • Protecting admin functionality with capability checks
  • Avoiding hardcoded credentials
  • Processing payment status through server-side verification
  • Keeping sensitive credentials outside version control

Never commit:

API keys
Merchant credentials
Webhook secrets
Passwords
Production database credentials
Private tokens
.env files containing secrets

🧪 Development

This project is currently being developed and tested in a local WordPress environment.

Recommended development setup:

WordPress
PHP
MySQL
Apache / Nginx
Local WordPress environment

You can use tools such as:

  • Local
  • XAMPP
  • Docker
  • WordPress Studio
  • A development VPS

📸 Screenshots

Screenshots will be added as the plugin's UI continues to evolve.

Admin Dashboard

Adding Soon

Premium Article

Adding Soon

Payment Flow

Adding Soon

Article Unlock

Adding Soon


📁 Project Structure

The project structure may evolve as the plugin grows.

wp-paypass/
│
├── includes/
│   ├── class-payment.php
│   ├── class-frontend.php
│   └── class-admin.php
│
├── assets/
│   └── wppp.js
│
├── wp-paypass.php
├── README.md
└── ...

🎯 Project Goals

The main goals of WP PayPass are to:

  1. Provide a simple pay-per-article monetization model for WordPress publishers.
  2. Integrate payment gateways into WordPress through clean APIs.
  3. Handle asynchronous payment events using webhooks.
  4. Control access to premium content based on verified payment status.
  5. Build the plugin in a way that can support multiple payment providers in the future.

🔮 Future Vision

The long-term goal is to turn WP PayPass into a flexible monetization platform for WordPress publishers.

Instead of depending on a single payment provider, the plugin is intended to evolve toward a gateway-based architecture where publishers can choose the payment provider that best fits their audience.

A future version could look like:

                  WP PayPass
                      │
          ┌───────────┼───────────┐
          │           │           │
       PhonePe     Razorpay     Stripe
          │           │           │
          └───────────┼───────────┘
                      │
                 Payment Layer
                      │
                Access Control
                      │
                Premium Article

This would allow the core content-access system to remain independent from any specific payment provider.


🤝 Contributing

Contributions, suggestions, and feedback are welcome.

If you would like to contribute:

# Fork the repository

# Clone your fork
git clone https://github.com/Roshan-Singh001/wp-paypass.git

# Create a branch
git checkout -b feature/your-feature

# Make your changes

# Commit
git commit -m "Add your feature"

# Push
git push origin feature/your-feature

Then open a Pull Request.


🐛 Issues & Feature Requests

If you find a bug or have an idea for a feature, please open an issue with:

  • A clear description
  • Steps to reproduce the issue
  • Expected behavior
  • Actual behavior
  • WordPress/PHP version
  • Relevant logs or screenshots

For feature requests, explain the problem the feature would solve and how you think it could improve the plugin.


⚠️ Development Status

WP PayPass is currently an experimental/active-development project.

The plugin should be thoroughly tested in a staging environment before being used to process real payments or deployed on a production website.

Payment integrations may change as the project evolves.


📄 License

This project is licensed under the MIT License.


👨‍💻 Author

Roshan Singh

Full-Stack Developer interested in web applications, WordPress, APIs, automation, and software development.


⭐ If you find this project useful or interesting, consider giving it a star.