Skip to main content

Email Notifications

Arthera SMP can send email notifications when certain events occur:

  • INVOICE_CREATION: The customer will receive an email informing them that a new invoice is available.
  • INVOICE_NOTIFICATION: The customer will receive an email about upcoming invoices
  • INVOICE_PAYMENT_SUCCESS: The customer will receive an email after each successful payment or refund.
  • INVOICE_PAYMENT_FAILED: The customer will receive an email after each failed payment.
  • SUBSCRIPTION_CANCEL: The customer will receive an email at the time a subscription was requested to be canceled and/or at the effective date of the subscription cancellation.

Email Templates

Every time Arthera send a notification email, it will use the configured template for each notification type. Arthera SMP uses the mustache engine for generating HTML content.

The templates need to be standalone HTML documents that have Mustache directives and placeholders for various variables that Arthera will fill automatically. Because the template must be a standalone HTML document, you need to embed all CSS styles in the HTML and insert images either as Base64 data elements or by using external links.

Arthera SMP provides the following variables to the email HTML templates:

VariableDescription
accountCustomer account details
account.nameCustomer full name (first name and last name)
account.emailCustomer email address
account.address1Customer address
account.companyNameCustomer company name
account.cityCustomer city
account.stateOrProvinceCustomer state/province
account.postalCodeCustomer postal code
account.countryCustomer country
subscriptionSubscription data
subscription.createdDateDatetime the service starts
subscription.billingStartDateDatetime on which the system starts invoicing
subscription.billingEndDateDatetime on which the system ends invoicing
subscription.billCycleDayLocalDay of the month on which invoices are generated)
subscription.stateCurrent state of the subscription (see notes below)
invoiceInvoice details
invoiceInvoice details
invoice.formattedInvoiceDateInvoice date
invoice.formattedChargedAmountInvoice charge amount
invoice.formattedPaidAmountInvoice paid amount
invoice.formattedBalanceInvoice balance
invoice.invoiceItemsInvoice items list
invoice.invoiceItems[].formattedStartDateStart date of invoice item
invoice.invoiceItems[].formattedEndDateEnd date of invoice item
invoice.invoiceItems[].prettyPlanNameDisplay name of the plan
invoice.invoiceItems[].prettyProductNameDisplay name of the product

subscription.state - possible values are:

  • PENDING: The subscription is not yet created.
  • ACTIVE: The subscription is currently active.
  • BLOCKED: The subscription is currently paused.
  • CANCELLED: The subscription has been cancelled.
  • EXPIRED: The subscription has expired. This state is applicable only for subscriptions with a Fixed Term phase.