When they search, make sure they find you!

Using Template Merge Tags

Merge tags are the dynamic placeholders that make your email templates personalized and functional. This guide covers how to use them effectively within your Pro email templates.

Available Tags

All of the following merge tags work in both the subject line and body of your templates:

  • {first_name} — Client’s first name
  • {last_name} — Client’s last name
  • {email} — Client’s email address
  • {amount} — The payment amount
  • {payment_link} — The full generated payment URL
  • {logo} — Your business logo as a complete HTML <img> element
  • {site_name} — Your WordPress site name

Using {payment_link} in HTML

The {payment_link} tag is especially important because it’s the core of every payment email. It renders as the full URL string — for example: https://yoursite.com/payment-form/?amount=150&first_name=John

In HTML templates, wrap it in an anchor tag to create a clickable button or link:

<a href="{payment_link}" style="background-color:#2271b1; color:#ffffff; padding:12px 24px; text-decoration:none; border-radius:4px; display:inline-block;">Pay Now</a>

Always include the plain URL as a fallback below any styled button, in case the recipient’s email client doesn’t render HTML links correctly:

<p style="font-size:12px; color:#666;">Or copy and paste this link: {payment_link}</p>

Using {logo}

The {logo} tag renders as a complete <img> element using the logo image you uploaded in Payment Links > Settings. For example, it might output:

<img src="https://yoursite.com/wp-content/uploads/2025/01/logo.png" alt="Site Name" style="max-width:200px;" />

If no logo has been uploaded, the tag renders as an empty string — it simply disappears from the email, leaving no broken image or placeholder text.

Place the logo tag inside a centered container at the top of your template:

<div style="text-align:center; padding:20px 0;">{logo}</div>

Subject Line Examples

Merge tags work in subject lines just as they do in the body. Here are some effective subject line patterns:

  • Payment request for {first_name} {last_name} — {amount}
  • Hi {first_name}, your invoice is ready
  • {site_name}: Payment of {amount} due
  • Reminder: {amount} payment pending — {first_name}

How Tags Are Processed

Tags are replaced at send time using the values entered on the generator page. The replacement process works through two WordPress filters:

  • idplg_email_subject — Processes merge tags in the subject line
  • idplg_email_body — Processes merge tags in the email body

When a Pro template is selected on the generator page, the Pro version overrides these filters to use the selected template’s subject and body instead of the Settings page defaults. The merge tag replacement logic itself is identical — only the source of the template content changes.

Important Rules

  • Tags are case-sensitive: {first_name} works, {First_Name} does not
  • Tags must include curly braces: first_name without braces is treated as plain text
  • Unrecognized tags (e.g., {unknown_tag}) are left as-is in the output
  • Empty values result in the tag being replaced with an empty string

Tip: After creating a new template, send a test email to yourself. Verify that all merge tags are replaced correctly and that the HTML layout renders as expected in your email client before using the template with real clients.