Create Payment Request Email Template

Follow below steps to be able to send Payment Request email to your customers:

1. Make sure you are setup to allow Online Payments.

2. Create a lookup relationship between our Payment object and your object (standard or custom). If your object is the standard Account, Contact or Opportunity objects, there's no need to create the relationship as they are already pre-defined in Payment Center.

3. Create your email template. It should either be an HTML or a Visualforce email template so you can embed a link. To construct your link, you can follow the same steps when creating a Pay Now button in your object.

Here is an example of a Visualforce email template created for custom Order object.

<messaging:emailTemplate subject="Payment Request" recipientType="Contact" relatedToType="Order__c" renderUsingSystemContextWithoutSharing="true">
<messaging:htmlEmailBody >

<html>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<style type="text/css">
img {
    max-width: 100%;
}
body {
    -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; line-height: 1.6em;
    background-color: #f6f6f6;
}
@media only screen and (max-width: 640px) {
    body {
        padding: 0 !important;
    }
}
</style>
</head>


<body>
<table width="100%" 
    cellpadding="0" 
    cellspacing="0" 
    style="font-family: Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 15px; margin: 0; font-weight: 100;">

<tr style="font-family: Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 15px; margin: 0; color:#6c6c6c">
<td class="content-block" 
    style="font-family: Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 15px; vertical-align: top; margin: 0; padding: 38px 0 38px;" 
    valign="top">


Dear Valued Customer,
<br/><br/><br/>
Thank you for your business.
<br/><br/>
Clicking the button below should direct you to a secured page where you can process your payment.
<br/><br/>
A confirmation email will be sent to you once payment is posted in your account.


<br/><br/><br/><br/>
<a href="https://devorgami-developer-edition.ap24.force.com/payment/fw1__Payment?amount={!TEXT(RelatedTo.Balance_Due__c)}&accountId={!RelatedTo.AccountId__c}&contactId={!RelatedTo.Contact__c}&lookupField=Order__c&lookupId={!RelatedTo.Id}&reference={!RelatedTo.Name}&lookupObject=Order__c&paidAmountField=Paid_Amount__c" class="btn-primary" style="font-family: Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 15px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #4099FF; margin: 0; border-color: #4099FF; border-style: solid; border-width: 10px 20px;">Process Order Payment</a>

<br/><br/><br/>

Sincerely,  
<br/><br/>
{!$Organization.Name}
<br/>
<apex:outputPanel >
    {!$Organization.Street}<br/>
    {!$Organization.City}, 
    {!$Organization.State} 
    {!$Organization.PostalCode}<br/>
    {!$Organization.Country}<br/>
    {!$Organization.Phone}<br/>
</apex:outputPanel>
</td>
</tr>

</table>

</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>


 

 

Send Payment Request Email 

To send your Payment Request Email to your customer, you can either create a button or use the Send Email functionality native to Salesforce.

In the Email section of your Activity tab (or related list), click the Insert, create, or update template icon and select Payment Request email template.

 

The contents of the email template you created will be automatically populated. Hit Send.

 

In the Email your customer receives, clicking the Process Order Payment button will direct them to a secure page where they can process their payment.

 

After a successful payment, Paid Amount on your Order record should be automatically populated and a payment record will be added to the Order.