Various actions taken with mtCharge+ within NetSuite result in emails being generated to the Customer associated with the relevant records.
Below are some useful things as they relate to email templates and variables you can use when crafting your own.
Available Variables for Email Templates
The following variables may be used in Email Templates within NetSuite to populate their relevant data points:
| Variable | Description | Use |
| {{cardLast4}} | Last 4 digits of card | Generally used when a payment declines. |
| {{declineReason}} | Reason a card has been declined | Process a Payment and Capture a Pre-Authorization actions on Sales Orders, Cash Sales, and Invoices records. |
| {{chargeAmount}} | Amount the card will be charged | Send Payment Link action on Sales Orders, Cash Sales, and Invoice records. Also relevant to Resend link from the Payment Links tab within a Customer record |
| {{expiryHours}} | Hours until the link expires | Send Card Save Link action from a Customer Record." Send Payment Link action on Sales Orders, Cash Sales, and Invoices. |
| {{saveCardLink}} | Unique URL used to collect a card to save | Send Card Save Link action from a Customer Record. Also relevant to Resend link from the Payment Links tab within a Customer record. |
| {{paymentLink}} | Unique URL used to receive payment | Send Payment Link action on Sales Orders, Cash Sales, and Invoice records. Also relevant to Resend link from the Payment Links tab within a Customer record |
Sample Template
The sample template below is an example of using the Send Payment Link action, but can be reworded/modified to your use for other actions as needed.
<html>
<body style="margin:0;padding:0;background:#f4f6f9;font-family:Arial,Helvetica,sans-serif;">
<table style="background: #f4f6f9; padding: 32px 0;" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="center">
<table style="background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.08);" width="600" cellspacing="0" cellpadding="0"><!-- Header -->
<tbody>
<tr>
<td style="background: #0B1D3A; padding: 24px 36px;"><span style="color: #fff; font-size: 20px; font-weight: bold; letter-spacing: -0.5px;"> MarketTime </span></td>
</tr>
<!-- Body -->
<tr>
<td style="padding: 36px 36px 24px;">
<p style="margin: 0 0 6px; font-size: 15px; color: #0b1d3a;">Hello ${entity.companyName},</p>
<h1 style="margin: 0 0 18px; font-size: 22px; font-weight: bold; color: #0b1d3a; line-height: 1.3;">You have a pending payment of {{chargeAmount}}</h1>
<p style="margin: 0 0 24px; font-size: 14px; color: #5a6e85; line-height: 1.7;">We noticed your secure payment link expired before you had a chance to use it. We’ve refreshed it for you — it’s ready to use and will expire in {{expiryHours}} hours.</p>
<!-- CTA button (table wrapper for email client compatibility) -->
<table style="margin-bottom: 24px;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="border-radius: 4px; background: #0070D2;"><a style="display: inline-block; padding: 13px 30px; font-size: 15px; font-weight: bold; color: #ffffff; text-decoration: none;" href="{{paymentLink}}"> Complete Payment → </a></td>
</tr>
</tbody>
</table>
<p style="margin: 0; font-size: 12px; color: #8a9bb0; line-height: 1.7;">Or copy this link into your browser:<br /><a style="color: #0070d2; word-break: break-all;" href="{{paymentLink}}"> {{paymentLink}} </a></p>
</td>
</tr>
<!-- Divider -->
<tr>
<td style="padding: 0 36px;"><hr style="border: none; border-top: 1px solid #E3ECF5; margin: 0;" /></td>
</tr>
<!-- Footer -->
<tr>
<td style="padding: 22px 36px 30px; font-size: 12px; color: #8a9bb0; line-height: 1.65;">This reminder was sent on behalf of ${entity.companyName}. If you did not expect this email, please disregard it and do not share the link with anyone.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
This can generally be used when creating Email Templates in NetSuite, using the Source Code feature when creating it.
Last updated: