The Payment Terms block is a dynamic content component that displays subscription pricing information and terms. It automatically updates based on the selected pricing plan and uses data attributes to populate content and control visibility.

How It Works
- This block (and technically any other block on Paywall) contains HTML code that can be used to show properties of a selected Price
- The content is updated when user selects the prices
- It shows/hides content conditionally based on whether values exist
HTML elements Data Attributes
data-price-fill="property"
โย Fill this element with Price property
data-price-fill="property"
โย Fill this element with Price propertyPopulates the element's HTML content with the specified property value.
<span data-price-fill="priceCurrentCurrency">$9.99</span>
<span data-price-fill="period_name">month</span>
data-price-fill-toggle="property"
โย Show this element only if property has value
data-price-fill-toggle="property"
โย Show this element only if property has valueShows the element only if the property has a value (truthy).
<span data-price-fill-toggle="freePeriodDescr">
You have a <span data-price-fill="freePeriodDescr">7 days free</span> trial
</span>
data-price-fill-toggle-not="property"
โย Hide this element only if property has value
data-price-fill-toggle-not="property"
โย Hide this element only if property has valueShows the element only if the property has no value (falsy).
<span data-price-fill-toggle-not="freePeriodDescr">
No free trial available
</span>
Available Properties
Property | Description | Example Values |
---|---|---|
priceCurrent | Current price amount (number) | 9.99 , 0 (for trials) |
priceCurrentCurrency | Current price with currency symbol | $9.99 , โฌ12.50 , ยฃ8.99 |
priceOld | Original price (before discount) | $19.99 , "" (if no discount) |
priceBase | Base price with currency | $9.99 |
priceCurrentComparison | Price for comparison period | 29.97 (for 3 months) |
specialOfferText | Special offer description | 50% OFF , "" |
pricePeriodDescr | Price description | $9.99 , One-time payment |
freePeriodDescr | Free trial description | 7 days free , 30 days free , |
priceDiff | Price difference (savings) | -$10.00 , "" |
discountPercent | Discount percentage | 50 , 25 , 0 |
period_name | Billing period name | month , year , 3 months , 1 week |
period_number | Period number only | 3 , 12 , "" (for single periods) |
next_charge_date | Next billing date | 15 December 2024 |
mainPeriodName | Original period name | month , year |
Usage Examples
Basic Payment Terms
<div class="payment-terms">
<p>
You will be charged <span data-price-fill="priceCurrentCurrency">$9.99</span>
every <span data-price-fill="period_name">month</span> until you cancel.
</p>
</div>
With Free Trial
<div class="payment-terms">
<p>
<span data-price-fill-toggle="freePeriodDescr">
Start your <span data-price-fill="freePeriodDescr">7 days free</span> trial,
then
</span>
<span data-price-fill="priceCurrentCurrency">$9.99</span>
per <span data-price-fill="period_name">month</span>.
</p>
</div>
With Discount Information
<div class="payment-terms">
<p>
<span data-price-fill-toggle="priceOld">
<s data-price-fill="priceOld">$19.99</s>
</span>
<span data-price-fill="priceCurrentCurrency">$9.99</span>
<span data-price-fill-toggle="discountPercent">
(Save <span data-price-fill="discountPercent">50</span>%)
</span>
per <span data-price-fill="period_name">month</span>
</p>
</div>
Complete Terms Example
<div class="payment-terms">
<p>
Without cancellation,
<span data-price-fill-toggle="freePeriodDescr">
before the <span data-price-fill="freePeriodDescr">7 days free</span> trial ends,
</span>
<span data-price-fill-toggle-not="freePeriodDescr">
before the selected discounted intro plan ends,
</span>
I accept that the service will automatically charge
<span data-price-fill="priceCurrentCurrency">$9.99</span>
every <span data-price-fill="period_name">month</span>
until I cancel.
<span data-price-fill-toggle="next_charge_date">
Next charge: <span data-price-fill="next_charge_date">15 December 2024</span>
</span>
</p>
</div>
Comparison Pricing
<div class="payment-terms">
<p>
<span data-price-fill="priceCurrentCurrency">$29.99</span> per year
<span data-price-fill-toggle="priceCurrentComparison">
(Just <span data-price-fill="priceCurrentComparison">$2.50</span> per month)
</span>
</p>
</div>
Implementation Notes
- Automatic Updates: The content updates automatically when users select different pricing plans
- Conditional Display: Use toggle attributes to show/hide content based on plan features
- Localization: All text content supports localization through the
__()
function - Currency Support: Prices automatically include the appropriate currency symbol
- Trial Handling: Free trial periods are handled with
freePeriodDescr
and show$0
pricing during trial