# Email Notification (Pro)

In contrast to Contact Form 7's built-in email feature, which is only sent after a successful payment and does not include payment details, most site owners prefer to receive notifications during the payment process. This includes alerts for successful or failed payments, as well as the ability to automate tasks based on these notifications.

### Prerequisites

* [x] Plugin Professional Plan
* [x] WP SMTP provider works
* [x] [Webhook Configuration](/getting-started/webhook-configuration.md)

### Supported Emails

We currently offer notifications for three event types:

* Payment Succeeded
* Payment Failed
* Customer Invoice

These can be enabled/disabled and customized individually to match your site's style. Let us know if any other email notifications would be helpful for your workflow and we'll consider adding them.

<figure><img src="/files/NsGBdRNpmdLtAK1xaYaM" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When specifying recipient(s), you can enter multiple emails separated by commas. For example:

{customer.email}, <sales@payaddons.com>
{% endhint %}

### Supported Merge Fields

The following merge tags can be used to dynamically insert data into the email content:

{% hint style="warning" %}
**Note**: Some fields may be empty depending on the payment type - for example, shipping details may be empty if no shipping is required when collecting payment information
{% endhint %}

```
{site_title}
{site_url}
{header_text}

{amount}
{description}
{currency}
{created}
{amount_currency}
{matedata}
{payment_method.type}
{payment_method.card.brand}
{payment_method.card.last4}
{customer.name}
{customer.email}
{customer.phone}
{customer.address.country}
{customer.address.state}
{customer.address.city}
{customer.address.line1}
{customer.address.line2}
{customer.address.postal_code}
{billing_detail.address.country}
{billing_detail.address.state}
{billing_detail.address.city}
{billing_detail.address.line1}
{billing_detail.address.line2}
{billing_detail.address.postal_code}
{shipping_detail.address.country}
{shipping_detail.address.state}
{shipping_detail.address.city}
{shipping_detail.address.line1}
{shipping_detail.address.line2}
{shipping_detail.address.postal_code}
{error.message}
{receipt.url}
{payment_intent_id}
```

### Metadata merge field

Metadata is a powerful feature that allows you to store all the submitted form data, which can be leveraged to populate email templates with field names. This information can also be found in the Stripe Dashboard.

{% hint style="info" %}
The **{metadata}** is a formatted key-value string including the specified metadata (for checkout redirection) or form values (for payment form)

We can split them by giving an existing key. For example, if a form id key is called 'first\_name', we can use it in email as **{metadata.first\_name}**
{% endhint %}

<figure><img src="/files/BEhEk2dXQX7v8Aqxw5mH" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cf7-docs.payaddons.com/basics/email-notification-pro.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
