Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fourthwall.com/llms.txt

Use this file to discover all available pages before exploring further.

Access membership tier information through the membership_tiers object. This contains all configured tiers for the shop, both free and paid.

Iterating over tiers

{% for tier in membership_tiers %}
  <div class="tier-card">
    <h3>{{ tier.name }}</h3>
    {% if tier.type == 'Paid' %}
      <p>{{ tier.monthly_price | money }} per month</p>
    {% else %}
      <p>Free</p>
    {% endif %}
  </div>
{% endfor %}
Each tier has a type property that is either "Free" or "Paid". Use this to branch your rendering logic.

Free tier properties

PropertyTypeDescription
typestringAlways "Free"
namestringTier display name
descriptionstringTier description
positionintegerDisplay order
image_urlstringTier image URL
members_countintegerNumber of members
perksarrayList of perk descriptions (strings)
registration_urlstringSignup URL
PropertyTypeDescription
typestringAlways "Paid"
namestringTier display name
descriptionstringTier description
positionintegerDisplay order
imagestringTier image URL
members_countintegerNumber of members
featuresarrayList of feature descriptions (strings)
urlstringTier purchase URL
trial_enabledbooleanWhether free trial is available
Free tiers use image_url for the image, while paid tiers use image. Free tiers list benefits as perks, while paid tiers use features.
PropertyTypeDescription
monthly_pricemoneyMonthly subscription price
monthly_variantvariantMonthly billing variant
compare_at_monthly_pricemoneyOriginal monthly price (for first-month discounts)
annual_pricemoneyAnnual subscription price
annual_variantvariantAnnual billing variant
annual_offer_idstringAnnual offer identifier
annual_urlstringAnnual subscription URL
annual_discount_enabledbooleanWhether annual discount is active
annual_discount_percentageintegerAnnual discount percentage
compare_at_annual_pricemoneyOriginal annual price

Displaying prices

{% if tier.compare_at_monthly_price %}
  <s>{{ tier.monthly_price | money }}</s>
  {{ tier.compare_at_monthly_price | money }} first month
{% else %}
  {{ tier.monthly_price | money }} per month
{% endif %}

Variant discounts

Each tier variant may have discount information for specific promotions:
<!-- Twitch subscriber discount -->
{{ tier.monthly_variant.discounts.twitch.after_discount_price | money }}

<!-- Introductory discount -->
{{ tier.monthly_variant.discounts.introductory.after_discount_price | money }}

Twitch discount properties

PropertyTypeDescription
discounts.twitch.after_discount_pricemoneyPrice after Twitch sub discount

Introductory discount properties

PropertyTypeDescription
discounts.introductory.started_atdatetimeDiscount start date
discounts.introductory.ended_atdatetimeDiscount end date
discounts.introductory.after_discount_pricemoneyPrice after introductory discount

Example: Membership tiers grid

{% for tier in membership_tiers %}
  <div class="tier-card">
    {% if tier.type == 'Free' %}
      {% if tier.image_url %}
        <img src="{{ tier.image_url | img_url: 'medium' }}" alt="{{ tier.name }}">
      {% endif %}

      <h3>{{ tier.name }}</h3>

      {% if tier.members_count %}
        <p>{{ tier.members_count }} member{% if tier.members_count != 1 %}s{% endif %}</p>
      {% endif %}

      <p>Free</p>

      <a href="{{ tier.registration_url }}">Join now</a>

      {% if tier.perks.size > 0 %}
        <ul>
          {% for perk in tier.perks %}
            <li>{{ perk }}</li>
          {% endfor %}
        </ul>
      {% endif %}

    {% elsif tier.type == 'Paid' %}
      {% if tier.image %}
        <img src="{{ tier.image | img_url: 'medium' }}" alt="{{ tier.name }}">
      {% endif %}

      <h3>{{ tier.name }}</h3>

      <p>
        {% if tier.compare_at_monthly_price %}
          <s>{{ tier.monthly_price | money }}</s>
          {{ tier.compare_at_monthly_price | money }} first month
        {% else %}
          {{ tier.monthly_price | money }} per month
        {% endif %}
      </p>

      <a href="{{ tier.url }}">
        {% if tier.trial_enabled %}
          Start 7-day free trial
        {% else %}
          Join now
        {% endif %}
      </a>

      {% if tier.annual_price %}
        <p>
          <a href="{{ tier.annual_url }}">
            Save {{ tier.annual_discount_percentage }}% if you pay annually
          </a>
        </p>
      {% endif %}

      {% if tier.features.size > 0 %}
        <ul>
          {% for feature in tier.features %}
            <li>{{ feature }}</li>
          {% endfor %}
        </ul>
      {% endif %}
    {% endif %}
  </div>
{% endfor %}