Blog Paywall: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

Show a post's paywall to a visitor

A visitor without access opens a post, and your app needs the paywall content to show in place of the post body. The post may use a library template, have content of its own, or have no paywall set at all.

To show a post's paywall:

  1. Call Get Post Paywall with the post's ID, wix.blog.v4.post as the post FQDN, and the post's language:

    Copy
  2. Render the richContent from the response in place of the post body.

Let a site owner pick a paywall template for a post

When a site owner adds a paywall to a post, they choose from the templates in the site's library.

To let a site owner pick a template:

  1. Call List Paywall Templates to retrieve the library templates in the post's language:

    Copy
  2. Present the returned templates to the site owner.

  3. Call Upsert Post Paywall with the chosen template on the draft post:

    Copy

    When the post is published, the published post gets the same paywall. The post reflects every later edit to the template.

Let a site owner customize the paywall of a single post

A site owner editing the paywall from inside a post shouldn't change what other posts using the same template show.

To let a site owner customize a single post's paywall:

  1. Call Get Post Paywall with wix.blog.v4.draft_post as the post FQDN to retrieve the content the post currently shows, and open it in your editor.

  2. When the site owner saves, call Upsert Post Paywall on the draft post with the edited content instead of a template reference. If the content started from a template, specify that template's ID in basePaywallTemplateId:

    Copy

    Setting richContent clears paywallTemplateId, so the post no longer reflects edits to the template.

  3. To make the post's content available to other posts, call Create Paywall Template with it.

  4. To return the post to the global default paywall, call Delete Post Paywall on the draft post.

Offer a branded paywall in another language

A multilingual blog shows the global default paywall to readers of posts in a language the site hasn't authored a template for. The site owner wants a paywall that matches the site's branding instead.

To offer a branded paywall in another language:

  1. Call Get Default Paywall Template with the language to use the default content as a starting point:

    Copy
  2. Let the site owner edit the returned richContent in your editor.

  3. Call Create Paywall Template with the edited content and the language:

    Copy
  4. For each post in that language, call Upsert Post Paywall on the draft post with the new template's ID in paywallTemplateId. The published posts get the template the next time they're published or updated.

Last updated: 4 December 2026

Did this help?