account.name- Your MoonClerk account nameaccount.email- You MoonClerk account email (may be different from your sign in email)account.currency- The currency your MoonClerk and Stripe account are using
plan.id- MoonClerk Plan IDplan.reference- Stripe Customer ID for this planplan.url- a link to this plan on MoonClerkplan.payer_manage_url- The link for the payer to manage their planplan.name- Payer nameplan.email- Payer emailplan.payment_method.type- Method of payment used, i.e. Credit/Debit Card or Bank Accountplan.payment_method.last4- Last four digits of the card or bank accountplan.payment_method.brand- Card Type, i.e. Visa, MasterCard, etc. or Bank Name, i.e. Chase, Wells Fargo, etc.plan.payment_method.expiration- The month and year the active card expiresplan.discount.coupon- A description of the currently applied coupon, i.e. "10off ($10.00 off once)". This will only exist if there is an active discount. Otherwise it will be empty.plan.discount.expiration- The date the active discount expires for this plan. This will only exist if there is an active discount. Otherwise it will be empty.plan.status- The status of the plan (Active, Not Started, Canceled, etc.)plan.next_payment_attempt- The next scheduled payment attempt on this planplan.start- The first scheduled payment attemptplan.expires- The expiration date of the plan, if applicableplan.amount- The recurring amount in centsplan.amount_description- The description of the matching form amount option, if applicableplan.interval- week, month or yearplan.interval_count- 1 or moreplan.frequency- interval phrase, i.e. "every 3 months”plan.custom_fields- A Hash of custom field responses based on the form. See Custom Fields section.plan.checkout.date- The date of the checkoutplan.checkout.amount_due- The total amount of the first payment. This is the big number the payer sees when checking out. Amount is in cents.plan.checkout.subtotal- The amount of the form or the chosen amount if deferred. Amount is in cents.plan.checkout.fee- The net fee amount based on a fee amount or percentage as configured in your form. Amount is in cents.plan.checkout.upfront_amount- The one-time upfront amount that is added to the first payment. (Fees are not applied to this amount.) Amount is in cents.plan.checkout.trial_period_days- The number of trial period days for the checkout, if applicable.
payment.id- the MoonClerk internal payment IDpayment.reference- the Stripe charge IDpayment.url- a link to this plan on MoonClerkpayment.date- create datepayment.name- Payer's namepayment.email- Payer's emailpayment.amount- the payment amount in centspayment.amount_description- The description of the matching form amount option, if applicablepayment.fee- the fee in centspayment.amount_refunded- the amount refunded in centspayment.status- payment status in the dashboardpayment.payment_method.type- Method of payment used, i.e. Credit/Debit Card or Bank Accountpayment.payment_method.last4- Last four digits of the card or bank accountpayment.payment_method.brand- Card Type, i.e. Visa, MasterCard, etc.payment.payment_method.bank_name- Bank Name, i.e. Chase, Wells Fargo, etc.payment.invoice- the Stripe invoice IDpayment.custom_fields- A Hash of custom field responses based on the form. See Custom Fields section.
form.idform.urlform.titleform.description
Fields contain the responses from the custom fields created on your
forms. They are accessed through either payment.custom_fields or plan.custom_fields.
The custom_fields variable is a Hash. See how to loop over a Hash in Liquid.
The key will be the key you assign during the creation of your custom field in the payment form builder. The value contain the following fields:
title- the title of the fieldresponse- the text response or the address on a single lineaddress- contains field with the address parts. If the field is not an address it will be empty (null).
If address is not empty, it will contain:
address.line1address.line2address.cityaddress.stateaddress.postal_codeaddress.county
Here is a sample of the structure of some custom field data:
'shipping_address' => {
'title' => 'Shipping Address',
'address' => {
'line1' => '123 Sycamore St.',
'line2' => 'Suite 100',
'city' => 'Greenville',
'state' => 'SC',
'postal_code' => '29601',
'country' => 'United States'
},
'response' => '123 Sycamore St., Suite 100, Greenville, SC 29601, United States'
},
'tshirt_size' => {
'title' => 'T-shirt size',
'address' => nil,
'response' => 'X-Large'
}
Browse examples of how to use custom fields within a template.
order.nameorder.emailorder.access_link
package.namepackage.description
We are maintaining deprecated fields for backward compatibility but all new development should use the newer variables described below.
plan.payment_source.last4is nowplan.payment_method.last4plan.payment_source.brandis nowplan.payment_method.brandplan.payment_source.expirationis nowplan.payment_method.expirationpayment.payment_source.last4is nowpayment.payment_method.last4payment.payment_source.brandis nowpayment.payment_method.brand
Which Liquid variables can I use in which email notifications?
Keep in mind that even though a variable may be sent to your template, it may be empty. Outputting an empty variable should not cause an error.
| Template | payment.* | plan.* | account.* | form.* | invoice.* | order.* | package.* |
|---|---|---|---|---|---|---|---|
| Successful Payment | ✅ | ✅ | ✅ | ✅ | |||
| Recurring Plan Created | ✅ | ✅ | ✅ | ||||
| Failed Payment on Recurring Plan | ✅ | ✅ | ✅ | ✅ | |||
| Recurring Plan Ended | ✅ | ✅ | ✅ | ||||
| Card Expiration Date Approaching | ✅ | ✅ | ✅ | ||||
| Upcoming Payment | ✅ | ✅ | ✅ | ||||
| Successful Digital Delivery Order | ✅ | ✅ | ✅ | ✅ | ✅ |
money- formats money with a symbolmoney_with_currency- formats money with a symbol and currencymoney_without_currency- formats money as a decimal
Visit the Official Liquid Wiki to learn more about the standard filters and control flow constructs (if-then, etc.) that you can use within templates.