=== PostGate – Paywall, Membership & Stripe Subscriptions ===
Contributors: qodesphere
Tags: paywall, content restriction, membership, stripe, subscriptions
Requires at least: 6.2
Tested up to: 7.1
Stable tag: 1.0.5
Requires PHP: 8.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WordPress paywall and content restriction plugin. Sell premium content with Stripe payments, membership access, and recurring subscriptions.

== Description ==

### WordPress Paywall, Membership, and Content Restriction Plugin ###

PostGate is a WordPress paywall and content restriction plugin for selling premium content with Stripe. Create paid articles, subscription-based content, members-only sections, or a complete paywall without WooCommerce or a complex membership platform.

Accept one-time Stripe payments or recurring subscriptions and automatically give customers access to protected content after payment.

Protect an entire website, category, taxonomy, post, page, custom post type, or individual Gutenberg blocks. You can also create login-only content for registered users without requiring payment.

PostGate is designed for creators, bloggers, publishers, educators, consultants, and anyone who wants a simple way to monetize WordPress content while keeping their website and audience under their control.

### PostGate Quick Overview ###

https://www.youtube.com/watch?v=wWsmUSYLOZE

### Monetize WordPress Content with Stripe ###

Connect your Stripe account, sync products and prices, and offer one-time purchases and recurring subscriptions on the same paywall. Stripe-hosted Checkout handles payment details; PostGate uses verified webhooks to update orders and content access in WordPress. Test in Sandbox mode before switching to live payments.

Payment methods, currencies, processing fees, and Stripe Connect capabilities depend on the connected account's country and configuration. PostGate does not store card details on your WordPress server.

### Who Is PostGate For? ###

PostGate is for creators, bloggers, publishers, educators, consultants, and researchers who want to:

* Sell individual articles, tutorials, reports, or other premium content.
* Offer monthly or annual access to a subscriber-only publication.
* Protect a premium category or collection of related posts.
* Combine pay-per-article purchases with subscriptions.
* Require registration for selected content without charging readers.

### Flexible Content Restriction ###

Choose access rules for your site, supported post types, categories and taxonomies, or individual posts and pages. Post-level rules can override broader rules. Use the PostGate Lock Block to protect selected Gutenberg blocks while leaving the rest public. Login-only protection and role-based bypass are also available.

### Sell Paid Articles with One-Time Payments ###

Assign a one-time Stripe price to a post or page to create a pay-per-post offer. Readers register or log in, complete Checkout, and receive access to that content after successful payment confirmation. Use different products and prices for different articles or resources.

### Recurring Subscriptions and Membership Access ###

Use Stripe recurring prices for subscriber-only articles, categories, or a site-wide paywall. Show one or more subscription options alongside individual purchases. PostGate grants subscription access after confirmed checkout and updates access following supported cancellation and refund events. Subscribers can open Stripe Billing Portal to manage payment details, invoices, and cancellation options according to your Stripe setup.

PostGate supports paid membership access to content. It does not include community profiles or member directories.

### SEO-Friendly Content Previews ###

Show a public introduction before the paywall using a paragraph or word limit, configured globally or per item. This gives visitors context and can leave descriptive content available to search engines; it does not guarantee indexing or rankings. Write a preview that accurately reflects the protected article.

### Gutenberg and WordPress-Native Controls ###

Configure post and page paywalls in the Block Editor sidebar, or place selected content inside the PostGate Lock Block. Access is tied to WordPress user accounts, with role-based bypass where configured. Post and page restrictions can work with builders that use standard WordPress content rendering; the Lock Block requires the Block Editor. Test your theme, page builder, and cache setup with the full purchase flow.

### Google Sign-In and Stripe Promotion Codes ###

Optional Google Sign-In adds a Google button to PostGate login gates and native WordPress login or registration forms while keeping password login available. Configure the Google OAuth credentials in Settings > Integrations > Google Sign-In; HTTPS is required. Readers still need to purchase or subscribe to access paid content.

To offer a discount, create a coupon and linked promotion code in Stripe, then enable promotion codes for the applicable Live or Sandbox environment in Settings > Payments > Products. Readers enter eligible codes in Stripe Checkout. Stripe applies its own code and product restrictions.

### Customizable WordPress Paywalls ###

Choose Compact or Classic layouts and customize the badge, heading, description, buttons, login messages, public preview, and HTML around product options. Developers can override templates in a theme for deeper changes.

### Customer, Subscription, and Access Management ###

Review orders, statuses, revenue, and access grants in WordPress. PostGate includes purchase and manual-order emails, protected-content update notifications for subscribers, and Stripe Billing Portal access for subscription self-service. Notification sender details and messages are configurable.

### Developer Friendly ###

PostGate includes theme template overrides, WordPress actions and filters, REST API endpoints, and support for eligible custom post types and taxonomies. Its administration interface uses WordPress capabilities and familiar publishing workflows.

### How PostGate Works ###

1. Install PostGate and connect your Stripe account in Sandbox mode.
2. Configure the Stripe webhook endpoint and sync one-time or recurring products.
3. Choose the site, category, taxonomy, post, page, or Gutenberg blocks to protect.
4. Assign prices, configure the public preview, and complete a test checkout.
5. Confirm that access works, then switch PostGate and Stripe to live mode.

### Documentation and Support ###

* [Read the PostGate Quick Start Guide](https://qodesphere.tawk.help/article/quick-start-guide?utm_source=wporg&utm_medium=readme&utm_campaign=postgate)
* [Browse PostGate Documentation](https://qodesphere.tawk.help/category/postgate-documentation?utm_source=wporg&utm_medium=readme&utm_campaign=postgate)
* [Ask for help in the WordPress.org Support Forum](https://wordpress.org/support/plugin/postgate/)

== Installation ==

= Automatic Installation =

1. In the WordPress dashboard, go to Plugins > Add Plugin.
2. Search for "PostGate".
3. Select Install Now, then Activate.
4. Go to PostGate > Settings.

= Manual Installation =

1. Download the PostGate ZIP file.
2. In WordPress, go to Plugins > Add Plugin > Upload Plugin.
3. Upload the ZIP file and select Install Now.
4. Activate PostGate and go to PostGate > Settings.

= Configure Your First WordPress Paywall =

1. Confirm that the website uses HTTPS and that WordPress user registration is enabled.
2. Open PostGate > Settings > Payments and connect Stripe in Sandbox mode.
3. Add the displayed webhook endpoint in Stripe and save the signing secret in PostGate.
4. Create one-time or recurring prices in Stripe, then fetch and sync the products.
5. Choose global or post-type content restriction settings, if needed.
6. Edit a post or page, enable PostGate in the editor sidebar, and assign a product.
7. Choose a paragraph or word-count preview and customize the paywall message.
8. Complete a test purchase before switching PostGate and Stripe to live mode.

== Frequently Asked Questions ==

= What is a WordPress paywall plugin? =

A WordPress paywall plugin restricts access to selected content until a visitor meets a requirement such as logging in, making a one-time purchase, or having an active subscription. PostGate supports each of these access models.

= How do I add a paywall to WordPress? =

Install PostGate, connect Stripe, configure the webhook, sync a product, and choose the content to protect. You can add a paywall to the entire site, a post type, category, taxonomy, individual post or page, or selected Gutenberg blocks.

= How can I monetize or sell content on WordPress? =

PostGate lets you monetize and sell content on WordPress through individual article payments, recurring subscriptions, or both options on the same paywall. You can also restrict content to logged-in users without requiring payment.

= Can I sell paid articles and individual posts? =

Yes. Assign a one-time Stripe price to a post or page to sell it individually. After Stripe confirms the payment, PostGate grants the WordPress user access to the paid content.

= Can I use PostGate as a pay-per-post plugin? =

Yes. PostGate supports a pay-per-post model by assigning a one-time Stripe price to an individual post or page. You can also offer a recurring subscription as an alternative to purchasing that article separately.

= Can I offer both one-time payments and recurring subscriptions? =

Yes. A paywall can display one-time purchase options, recurring subscription options, or both. Products and billing intervals are configured in Stripe and synchronized with PostGate.

= Is PostGate a WordPress membership plugin? =

PostGate supports recurring subscriptions, login-only content, role-based access, and membership-style content protection. Its primary focus is paywalls and paid content rather than member directories, social communities, profiles, or other features found in a complete membership plugin.

= Can I create a membership website with PostGate? =

You can create a subscription-based website where registered users pay for access to protected content. If your membership website mainly needs paid articles, premium categories, or full-site subscription access, PostGate may provide a simpler setup than a traditional membership platform.

= What content can I restrict? =

PostGate can restrict content across an entire site, supported post types, posts, pages, categories, taxonomies, and individual Gutenberg blocks. Post-level rules can override broader site-wide or category content restriction.

= Can I lock only part of a post or page? =

Yes. Add the PostGate Lock Block in the WordPress Block Editor and place the protected blocks inside it. Content outside the Lock Block remains public.

= Is the PostGate paywall SEO friendly? =

PostGate can show an indexable preview based on a selected number of paragraphs or words while the premium content remains protected. No paywall plugin can guarantee rankings, so the public teaser should be useful, descriptive, and consistent with what readers receive after purchase.

= Does PostGate work with Gutenberg and page builders? =

PostGate includes native Gutenberg sidebar controls and a Lock Block for block-level paywalls. Post and page restrictions can work with builders such as Elementor, Divi, and Beaver Builder when they use standard WordPress content rendering. Test your theme and page builder before accepting live payments.

= Do customers need a WordPress account? =

Yes. A customer must register or log in so PostGate can associate the purchase or subscription with the correct WordPress user and restore access on future visits.

= Does PostGate support Google Sign-In or social login? =

Yes. Enable Google Sign-In in Settings > Integrations and configure your Google OAuth credentials. The Google login button appears on PostGate login gates and paywalls and on the native WordPress login and registration forms. WordPress password login remains available. Google is the supported social login provider in this version.

= Does PostGate support Stripe coupons and promotion codes? =

Yes. Create a coupon and a linked promotion code in Stripe, then enable Allow promotion codes in Settings > Payments > Products. Customers can enter discount codes in new Stripe Checkout sessions for one-time purchases and subscriptions. Stripe determines whether the code is eligible for the selected purchase.

= Do I need a Stripe account? =

Stripe is required for paid-content purchases and subscriptions. Login-only content restriction can be used without a payment. Stripe availability and Connect capabilities vary by country.

= Which Stripe payment methods and currencies are supported? =

PostGate uses the payment methods and currencies available to the connected Stripe account and selected Stripe Checkout configuration. Availability depends on the account country, business type, currency, and capabilities.

= Can I test Stripe payments before launching the paywall? =

Yes. Use PostGate and Stripe Sandbox mode to test products, Checkout, webhooks, purchases, subscriptions, and content access without processing live payments.

= How much does PostGate cost? =

PostGate is free to download and install from WordPress.org. A 5% PostGate platform fee applies to successful transactions, in addition to Stripe processing fees. Stripe fees depend on the connected account and country.

= What happens when a subscription is canceled? =

Stripe sends a supported webhook event to PostGate. PostGate then revokes the access associated with the canceled subscription according to the recorded order and content rules.

= What happens when a payment is refunded? =

For supported Stripe refund events, PostGate updates the related order and revokes the content access associated with the refunded payment.

= Can I customize the WordPress paywall design? =

Yes. Choose a Compact or Classic template, customize the badge, heading, description, buttons, login message, and surrounding HTML, or override PostGate templates in your theme.

= Does PostGate work with WordPress caching plugins? =

It can, but logged-in and personalized paid-content pages should not be served from a shared public cache. Confirm that your caching plugin excludes logged-in users and test purchase, login, cancellation, and access flows before launch.

= Do I need WooCommerce or another e-commerce plugin? =

No. PostGate connects directly to Stripe so you can sell paid articles and recurring access to premium content without WooCommerce or a separate shopping cart.

== Screenshots ==

1. PostGate WordPress paywall dashboard with paid-content revenue and order analytics
2. Site-wide paywall and content restriction settings for posts, pages, login access, and role bypass
3. Stripe Connect setup for paywall payments, paid articles, and recurring subscriptions
4. Stripe product synchronization with one-time and recurring price options
5. SEO-friendly content preview and WordPress paywall appearance customization
6. Post and page content restriction controls in the Gutenberg editor sidebar
7. Compact paywall template with one-time purchase and subscription options
8. Classic WordPress paywall template with premium content and pricing details
9. Gutenberg Lock Block for block-level paid content and content restriction
10. Paid-content order and access management inside WordPress
11. Stripe webhook configuration for automatic payment and subscription access
12. Login-only gate for registered-user and membership-style content

== External Services ==

PostGate connects to Stripe when an administrator connects an account, synchronizes products, creates a Checkout Session, or processes payment, refund, and subscription events. Stripe receives the account, product, price, customer, and transaction data needed for the requested operation. Stripe is required for paid-content features; login-only content restriction does not require a payment.

PostGate also communicates with a connection service operated by QodeSphere to initiate and complete the Stripe Connect OAuth flow. During this administrator-initiated connection, the site URL and Stripe authorization data needed to return the connection to WordPress may be transmitted. This service is used only when an administrator chooses to connect a Stripe account.

* [Stripe Services Agreement](https://stripe.com/legal/ssa)
* [Stripe Connected Account Agreement](https://stripe.com/legal/connect-account)
* [Stripe Privacy Policy](https://stripe.com/privacy)
* [PostGate Documentation](https://qodesphere.tawk.help/category/postgate-documentation?utm_source=wporg&utm_medium=readme&utm_campaign=postgate)

When Google Sign-In is enabled and a user chooses to sign in or link an account, PostGate redirects the browser to Google and exchanges the authorization code with Google on the server. Google receives the OAuth client ID, callback URL, requested scopes (openid, email, profile), state and nonce; the server-side token exchange also sends the client secret and authorization code. PostGate retrieves Google's public signing keys to verify identity tokens. Google returns the account identifier, verified email address and profile information. PostGate stores the Google account identifier on the WordPress user; new accounts also use the email address, display name, and first and last names when provided. Access and refresh tokens are not stored. Google is optional; password login remains available.

* [Google Terms of Service](https://policies.google.com/terms)
* [Google Privacy Policy](https://policies.google.com/privacy)

== Changelog ==

= 1.0.5 =
* Added Google Sign-In for login, registration, and explicit account linking, configured in the new Settings > Integrations tab.
* Added Stripe Checkout promotion codes with independent Live and Sandbox settings. One-time purchase fees use the original price, subject to Stripe collection limits.
* Improved discounted and free checkout processing, recording final payment totals and collected fees and handling delayed payment confirmations.
* Added structured data to identify restricted content for search engines.
* Added feedback forms in the dashboard and during plugin deactivation.
* Updated the Stripe connection service integration and improved webhook setup guidance.
* Fixed login-only content remaining locked after authentication and hid paywall login prompts for signed-in users.
* Improved Settings mobile navigation, translated tab labels, and Google sign-in button styling.
* Raised the minimum PHP version to 8.1.

== Upgrade Notice ==

= 1.0.5 =
Requires PHP 8.1 or later. Adds optional Google Sign-In and Stripe promotion codes, and login-only access fixes. Enable the new integrations and checkout options in Settings as needed.