# Welcome to Elementor Pay Addons

## **Thank you for choosing Pay Addons!**

Pay Addons is a powerful payment plugin for WordPress that seamlessly integrates [**Elementor**](https://elementor.com/) and [**Stripe**](https://stripe.com/). It's specifically designed to simplify payment management for website owners without requiring complex coding or technical knowledge.&#x20;

By powered by stripe, you would gain access to an extensive range of payment methods including Alipay, WeChat Pay, iDeal, SEPA, SOFORT, and more. Additionally, you can easily support one-time and recurring payments in over 35 countries and 135 currencies.

This documentation contains starter guides to help you quickly and easily integrate the Pay Addons plugin into your WordPress website.

## Quick links

{% content-ref url="/pages/zGChP5lh4e8qJ6p4ARqp" %}
[Prerequisites](/getting-started/prerequisites)
{% endcontent-ref %}

{% content-ref url="/pages/lkxkAyXAoL5MqL2KyYNm" %}
[Installation](/getting-started/installation)
{% endcontent-ref %}

{% content-ref url="/pages/aSXXwJ4bQmluUUrclqFt" %}
[Settings](/getting-started/settings)
{% endcontent-ref %}

## Get Started With Elements

We've put together some helpful guides for you to get set up with the payment widgets quickly and easily.

{% content-ref url="/pages/e3VW7oIKBYV3XvxlW6w8" %}
[Checkout Button](/elements/checkout-button)
{% endcontent-ref %}

{% content-ref url="/pages/dWut1p4tQQ8wMmWP2PlP" %}
[Confirmation Summary](/elements/confirmation-summary)
{% endcontent-ref %}

{% content-ref url="/pages/zkYb8vsrfJzI72do7hZE" %}
[Price Table Checkout](/elements/price-table-checkout)
{% endcontent-ref %}

{% content-ref url="/pages/fp4XdQfWqsiyctUvwB8o" %}
[Checkout Credit Card Form (Pro)](/elements/checkout-credit-card-form-pro)
{% endcontent-ref %}

{% content-ref url="/pages/p8VsSDZs7gmhNirvnBwQ" %}
[Checkout Element Form (Pro)](/elements/checkout-element-form-pro)
{% endcontent-ref %}

{% content-ref url="/pages/nE0B7cXGKZ4xh4TEaWFB" %}
[Checkout Redirect Form (Pro)](/elements/checkout-redirect-form-pro)
{% endcontent-ref %}

## Get Started With Templates

Coming soon...


# Prerequisites

Before using Pay Addons, it is important to ensure that your WordPress environment includes the **Elementor** page builder plugin and a **Stripe** account. Pay Addons is a payment plugin that is designed to work with Elementor, and it is not compatible with other page builders or WordPress environments that do not have Elementor installed.

## **MINIMUM REQUIREMENTS**

WordPress 5.0 or greater&#x20;

PHP version 7.0 or greater&#x20;

MySQL version 5.0 or greater

## Elementor Website Builder (v3.2.0 or greater)

To install Elementor website builder, Log in to your WordPress dashboard and install the active version

## Stripe Account

In order to use this plugin, you must have a Stripe account. If you do not have one, you can [register a stripe account](https://dashboard.stripe.com/register) for free.


# Installation

1. Install using the WordPress built-in Plugin installer, or Extract the zip file and drop the contents in the `wp-content/plugins/` directory of your WordPress installation.
2. Activate the plugin through the ‘Plugins’ menu in WordPress.
3. Go to "Pages" > "Add New" to create a new page.
4. Click on the "Edit with Elementor" button to open the Elementor page builder.
5. Drag and drop the "Pay Addons" widget from the left panel onto the content area of your page.
6. Customize the payment options and settings for your page using the Pay Addons widget.
7. Save and publish your page to make it live on your website.


# Settings

General settings for plugin

After you’ve Install and activated the plugin, navigate to Dashboard > **Elementor Pay**

<div align="left"><figure><img src="/files/jgizXZknzlYZk58n27mk" alt=""><figcaption></figcaption></figure></div>

Before you start using the plugin, you need to ensure that you have a Stripe account set up.&#x20;

### Stripe Restricted API Keys (recommended)

To integrate the plugin with Stripe, you’ll need Stripe API keys. Using your developer API keys directly is not recommended, as they include full permissions and could pose a security risk.

To help you generate API keys with minimal required permissions, we’ve created a Stripe App. Follow these steps:

1. **Install the App**: Visit the Stripe Marketplace and install the app here: [PayAddons App](https://marketplace.stripe.com/apps/payaddons).
2. **Access the App**:\
   After installation, go to your installed apps list in the Stripe Dashboard: [Installed Apps](https://dashboard.stripe.com/settings/apps).
3. **Generate API Keys**:\
   Click the **View API Keys** button in the app. This will generate a publishable key and a restricted key.
4. **Configure the Plugin**:\
   Copy the generated publishable key and restricted key into the plugin settings. These keys will only have the permissions necessary for the plugin to function securely.

\
By using restricted API keys, you ensure that the plugin operates with the minimum required permissions, enhancing the security of your Stripe integration.

<figure><img src="/files/9AbImINR0dg7eBadUnWU" alt=""><figcaption></figcaption></figure>

### Developer API Keys (Manual Setup)

If you prefer not to use the app to generate restricted API keys, you can manually create API keys directly from the Stripe Developer page. please follow this [link](https://stripe.com/docs/keys).

<div align="left"><figure><img src="/files/bG29RBpJxkCFq1aR3rfq" alt=""><figcaption></figcaption></figure></div>

## Try a temporary Stripe API Key?

If you don't have a stripe account yet but still want to evaluate our plugin, you can simply click the **Import** button which will generate a temporary account from us. You can use it for short-term test purposes. However, since this key may limit some features and settings, we would recommend you to use your own key once you finish the evaluation.

## Use your own Stripe API Key

here's a step-by-step guide to help you obtain your Stripe API key:

1. **No account yet?** Sign up for a Stripe account: To get started, you'll need to create an account on the Stripe website. Go to stripe.com and click on the "Sign up" button in the top right corner of the page. Follow the prompts to create your account and provide any necessary information.
2. Login stripe dashboard with your new or existing account. <https://dashboard.stripe.com/>
3. Navigate to the Developers section: Once you've logged in to your Stripe account, click on the "Developers" tab at the top of the screen. This will take you to the Stripe Developer Dashboard.
4. Access your API keys: In the Developer Dashboard, click on the "API Keys" link in the left-hand menu. Here, you'll see your Test API keys and Live API keys.
5. Copy your API key: To copy your API key, click on the "Reveal test key token" button (if you're using the Test API keys) or the "Reveal live key token" button (if you're using the Live API keys). Then, click on the "Copy" button to copy the key to your clipboard.
6. Use your API key: Now that you have your API key, you can use it to integrate Stripe with your website or application. Make sure to keep your API key secure and avoid sharing it with others.

And that's it! By following these steps, you should now have access to your Stripe API key and can start using it to process payments and manage your Stripe account.

> Stripe has two modes: Live & Test, make sure to use the proper mode

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


# Webhook Configuration

Webhooks allow Stripe to send messages back to your WordPress site. Setting up webhooks is required for some functionalities such as sending emails, creating subscription schedule (installment) plans

### What is a webhook?

Webhooks allow Stripe to send notifications to your website when certain events occur. For example, if a payment is refunded in Stripe, Stripe can automatically send a notification to your webhook to let your website know.

### Which features require a webhook?

* [x] Email notification
* [x] Delayed & Redirection payment methods (Sofort, PayPal, Alipay, etc)
* [x] Subscription schedule plan (occurrences)

### How to setup a webhook?

1. In your Stripe dashboard, click Developer -> [Webhooks](https://dashboard.stripe.com/webhooks), then click the Add endpoint button.

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

2. To get the endpoint URL, go back to the **Setting** tab in your WordPress dashboard and you should see a field labeled `Webhook URL`. Copy the URL or click the copy icon.

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

3. Paste the endpoint URL into the dialog box in your Stripe dashboard.

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

4. Add the below events to listener

```
payment_intent.payment_failed
payment_intent.succeeded
charge.succeeded
invoice.upcoming
invoice.payment_succeeded
invoice.payment_failed
checkout.session.async_payment_succeeded
checkout.session.async_payment_failed

```

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

### Enable Webhook signatures (Strongly recommended)

Generating a signature for the webhook can greatly protect your endpoint from being abused by external parties.

In your Stripe dashboard, go to the webhook settings and click the `Signing secret` button to generate a signature.

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

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

Go back to plugin settings and paste to the webhook secret field in the **Settings** tab

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

### Webhook Connection Test

First of all, let's do some payments with our plugin under test mode, then go to the webhook URL and find any events such as a payment\_intent.succeeded. Now click the \`Resend\` button to trigger the event again.

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

If the response is 200 (OK), our plugin will process the event and display a connected status in the Webhook URL field.

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


# Checkout Button

A simple elementor button to redirect your customer to a stripe-hosting checkout page with multiple payment methods, one-time, recurring, coupon, stripe tax, etc.

Checkout Button is a payment element that allows customers to quickly and easily check out and complete their purchase. With Pay Addons, you can add a Checkout Button to any page on your WordPress website using the Elementor page builder.

<div align="left"><figure><img src="/files/S9PyYp8LFiAUmEGkAxbc" alt=""><figcaption></figcaption></figure></div>

* [x] Coupon, Stripe-Tax.
* [x] One-Time & Recurring Pay.
* [x] Using a secure Stripe-Hosting checkout page that can be customized with your Brand.
* [x] More payment methods, like EPS, Giropay, Sofort, iDeal, Alipay, Apple/Google Pay, WeChat.
* [x] More custom fields, such as user email, price, frequency, quantity, currency, product, etc.

{% hint style="info" %}
If you’re[^1] interested in setting up a Checkout Form, see [Checkout Form](/elements/checkout-credit-card-form-pro).
{% endhint %}

### Enable Payment Button

To use the Checkout Button widget in Pay Addons, you need to first enable it under the Elements tab.&#x20;

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

Enabling the Checkout Button widget allows you to add a button to your website that customers can click to initiate the checkout process. This can help to simplify the checkout process and encourage more customers to complete their purchases. The widget is fully customizable, so you can adjust its appearance and behavior to fit your needs.

### Build Your Button

1. To get started, create a new page or post, and edit it using Elementor.
2. Next, drag and drop the <mark style="color:red;">**Checkout button**</mark> onto your page (you can search for it using the keyword "checkout" or find it under the "PAY-ADDONS" category)
3. Click on the button and customize the UI with Elementor as you wish.

<div align="left"><figure><img src="/files/D0PbZPC4YJeGP0sa49PY" alt=""><figcaption></figcaption></figure></div>

![](/files/No45eE9ubBFJWX5ZhMHc)

### General Settings

Users can customize **Payment methods**, **Mode, Shipping Address,** and other options in the general settings tab.

{% hint style="info" %}
Make sure the Success and Cancel redirect url are specified, these fields are required
{% endhint %}

{% hint style="info" %}
The subscription mode is only available under Premium plan.
{% endhint %}

<div align="left"><figure><img src="/files/4YAuT1LMsDfeXra6mhjE" alt=""><figcaption></figcaption></figure></div>

### One-time price settings

Choose mode as one-time

<div align="left"><figure><img src="/files/nrp3m3RMDPVA6pETKCCI" alt=""><figcaption></figcaption></figure></div>

Price settings allow users to customize **Currency**, **Quantity** options, and more.

<div align="left"><figure><img src="/files/35VzHigRvdEJMjSwbOrn" alt=""><figcaption></figcaption></figure></div>

### Subscription price settings (Pro)

Subscription products can also be added through a simple button. Select "Subscription" in the mode option to display recurring payment settings.

<div align="left"><figure><img src="/files/rxWBrPMZagwlacu5Y63o" alt=""><figcaption></figcaption></figure></div>

The recurring fields include "**Number of intervals**" and "**Recurring frequency**." For example, to create a 3-month subscription at $99, set the amount to 99, the number of intervals to 3, and select "month" as the frequency.

<div align="left"><figure><img src="/files/M3jfZn5UdiiOsEYanHN0" alt=""><figcaption></figcaption></figure></div>

#### Using Stripe Price

If you have more advanced configurations such as multiple currencies, tax codes, Statement descriptor, and different [pricing model ](https://docs.stripe.com/products-prices/pricing-models#flat-rate)such as Flat rate: Good-better-best, you can leverage the Stripe Built-in price & product. <https://docs.stripe.com/products-prices/manage-prices>

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

<div align="left"><figure><img src="/files/pKzlyOOpJ8TOSasScYDM" alt=""><figcaption></figcaption></figure></div>

#### Testing

After the configuration, click on the button, and you will be redirected to the stripe-hosting checkout page to finish the transaction.&#x20;

{% hint style="info" %}
Success: 4242424242424242 Any 3 digits Any future date

Decline:  4000000000000002 Any 3 digits Any future date

For more testing cards sample, please refer <https://stripe.com/docs/testing#use-test-cards>
{% endhint %}

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

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

### Success page

After filling in the payment information and clicking the Subscribe button, we will be redirected to the Success page which is configured in the previous section. In the thank-you page, we can reuse our [Confirmation Summary](/elements/confirmation-summary) widget or customize the [receipt shortcode](/customize-confirmation-page-pro) to collect the payment receipt information

<figure><img src="/files/32lsxicULZxhHgtnfqd7" alt=""><figcaption></figcaption></figure>

[^1]:


# Confirmation Summary

Use payment details, order details, custom message sections to create your Thank You page after a successful purchase redirect.

The Confirmation Summary is a payment element provided by Pay Addons that displays a summary of the user's payment details after they have completed a transaction. This summary typically includes information such as the item(s) purchased, the total amount paid, and any other relevant details related to the transaction.

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

{% hint style="info" %}
To fully customize your confirmation or thank-you page, refer to our [**Customize Confirmation Page (Pro)**](/customize-confirmation-page-pro) guide and utilize the receipt shortcode for a tailored experience.
{% endhint %}

To use the Confirmation Summary widget in Pay Addons, you need to first enable it under the Elements tab.&#x20;

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

## Settings

The **Confirmation Message**, **Payment Details** and **Billing Details** can be customized through the widget settings, allowing users to choose the message content and how it is displayed.

![](/files/0yBHHoFP41KCVRGZgj1X)

![](/files/imAnNu9OxvunUFjcCEip)

![](/files/rODUbl8ShRzXXQYDrfdS)

### Configure Success URL

All of our elements and forms are designed to allow you to specify a success redirection. You can easily assign your confirmation page by setting it as the S**uccess redirect url** or **Return url**.

<div align="left"><figure><img src="/files/Jt8aT3NWy6rKrEcRbVph" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/nvY3LyJfG2UjWoe3C68y" alt=""><figcaption></figcaption></figure></div>


# Price Table Checkout

Advanced Price Table widget with checkout button.

We understand that all price table widgets in Elementor addons are well-designed. However, they only provide a link button and do not consider the checkout links anymore. Therefore, we have developed a widget that not only offers a fully Elementor-style price table but also integrates a checkout process action with our [checkout button](/elements/checkout-button).

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

### Getting Start

* To get started, create a new page or post, and edit it using Elementor.
* Next, drag and drop the <mark style="color:red;">**Price Table**</mark> onto your page (you can search for it using the keyword "checkout" or find it under the "PAY-ADDONS" category)
* Click on the price table and customize the UI with Elementor as you wish.

![](/files/irw1nFZ4BgCAGdcy6td8)

### Style Price Table

The editing price table is no different from other price tables such as Elementor Price Table, we can follow the same guide for the editing & styling. <https://elementor.com/help/price-table-pro/>

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

### Handle the checkout button click

This is the only difference compared with other Price tables, which only provide the button link address, normally, user can generate a stripe checkout link in stripe dashboard and then paste it, however, it's always not convenient to create or modify the checkout setting like price in stripe dashboard side, so we move these settings from stripe side to here as the additional section <mark style="color:red;">**Checkout Settings**</mark> :

![](/files/c2gUZpvDyiDoSd4eN7la)

![](/files/6tOFL29mpvY8mrFKxURI)

> The button link value can be # as it is.

### Testing

After the configuration, click on the button, and you will be redirected to the stripe-hosting checkout page to finish the transaction.&#x20;

{% hint style="info" %}
Success: 4242424242424242 Any 3 digits Any future date

Decline:  4000000000000002 Any 3 digits Any future date

For more testing cards sample, please refer <https://stripe.com/docs/testing#use-test-cards>
{% endhint %}


# Custom Payment Form

Create Custom Payment Forms with Drag-and-Drop Simplicity

Don't have an Elementor Pro license? No problem. Our free form builder provides similar functionality to Elementor Pro's forms, enabling you to create professional payment forms with 10+ essential form fields and specialized payment elements.

### Creating Your Payment Form

1. Create a new post using the Elementor builder
2. Navigate to the **Pay Addon** category in the Elements panel
3. Locate the **Payment Form** element
4. Drag and drop it into your canvas

<div align="left"><figure><img src="/files/NUxXR73XuTBuPNNFIYHv" alt=""><figcaption></figcaption></figure></div>

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

#### Adding Form Fields

Customize your form by adding fields that suit your needs. We currently support the following field types:

* **Basic Fields:** Text, Email, Textarea, URL, Password, Hidden, HTML
* **Numeric Fields:** Decimal, Number
* **Selection Fields:** Radio, Select, Checkbox
* **Date & Time Fields:** Date, Time

{% hint style="success" %}
Credit Card and Payment Elements are available in the premium version.
{% endhint %}

<div align="left"><figure><img src="/files/qrKvi16QxvnnOdFaoNqI" alt=""><figcaption></figcaption></figure></div>

#### Styling Your Form

Our form builder offers complete customization control. You can adjust field sizes, button dimensions, and apply your own styling to match your brand identity perfectly.

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

<figure><img src="/files/18izvArZWysXtdMaS8ml" alt=""><figcaption></figcaption></figure>

### Configuring Payment Actions

Once your form structure is complete, configure how payments are processed when customers click the submit button.

**Available submission methods:**

* **Free Plan:** Checkout Redirection
* **Pro Plan:** Credit Card Submission, Payment Element Submission

Each submission method has its own configuration options.

<div align="left"><figure><img src="/files/bYfxBTntGuYKX4NiqWGj" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/Fzi5GyThHq8pTZyoQj47" alt=""><figcaption></figcaption></figure></div>

### Stripe Checkout Redirect Configuration

In the Payment Action, we choose 'Checkout Redirect'. Once it's been selected, the two new sections will show up: Stripe Checkout Redirect and Stripe Checkout Redirect Fields.&#x20;

#### Setting Up Checkout Redirect

Select **'Checkout Redirect'** in the Payment Action settings. This will reveal two new configuration sections:

1. Stripe Checkout Redirect
2. Stripe Checkout Redirect Fields

#### Stripe Checkout Redirect section

![](/files/ov7dxHOaKKpaPUwBH94P)

* **Payment Methods**: Specify which payment methods your customers can use. Select "**Automatic**" to inherit the payment methods activated in your Stripe Dashboard.
* **Success Redirect URL**:  Define where customers are sent after completing their payment (your "Thank You" page). You can create a custom confirmation page using our [Confirmation shortcode](/customize-confirmation-page-pro).&#x20;
* **Cancel Redirect URL**: Specify the page customers see when they cancel the payment process on the Stripe checkout page.
* **Billing Address**: Enable this option for payment scenarios that require billing address collection on the Stripe checkout page.
* Promotion Codes: Allow customers to apply coupon codes created in your Stripe Dashboard during checkout.
* **Automatic Taxes:**&#x20;

  Tax calculation can be complex, but it's essential for accurate payments. When enabled, taxes are calculated dynamically based on the customer's billing or shipping address. You'll need to specify the tax behavior:

  * **Exclusive:** Tax is added to the base amount (e.g., $10 item + tax = $10.XX total)
  * **Inclusive:** Tax is already included in the price (e.g., $10 item = $10 total)
* **Phone number**: Collect the customer's phone number as a required field on the Stripe checkout page.
* **Terms of service**: Display a terms of service link on the Stripe checkout page. Ensure you've created your Terms of Service content in the Stripe Dashboard beforehand.
* **Shipping Address Countries**:  Leave empty to allow all countries, or specify which countries customers can select for shipping addresses.
* **Metadata**: Attach additional payment information (such as order IDs) that won't be visible to customers but can be used for internal tracking and reference.

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

#### Stripe Checkout Redirect Field Section

This section handles payment configuration by mapping pricing, customer, and product-related fields.

<div align="left"><figure><img src="/files/jbtklApjbuclsbQLh6gX" alt=""><figcaption></figcaption></figure></div>

* **Customer email field**: Enter the form field shortcode. When specified, this email will be pre-filled on the Stripe checkout page.
* **Payment Type**: Choose from three options:

  * **One-time:** For standalone purchases
  * **Subscription:** For recurring subscriptions
  * **Flex:** Dynamically collects either one-time or subscription payments based on conditional logic

  When using Flex payment type, you can set conditions (for example, if a checkbox with ID "sub-checked" is selected, the payment will be processed as a subscription using your subscription settings).

<div align="left"><figure><img src="/files/UPpzhjfzlYKYun4xSY6m" alt=""><figcaption></figcaption></figure></div>

#### One-time payment setting

Same as <https://docs.payaddons.com/elements/checkout-credit-card-form-pro#one-time-payment-settings>

#### Subscription payment setting

Same as <https://docs.payaddons.com/elements/checkout-credit-card-form-pro#subscription-payment-settings>

### Testing Your Form

After configuring your form and submission settings, test the complete payment flow. When everything is set up correctly, customers will be redirected to the Stripe Checkout page displaying all the features you've configured:

* Payment methods
* Tax calculations
* Promotion code field
* Shipping address or phone number fields
* Terms of service link
* etc.

<figure><img src="/files/1KJtWbSQG8oIEnxQKv9b" alt=""><figcaption></figcaption></figure>

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

### Monitoring Transactions

After completing transactions, view all form submissions in the transaction list page. This gives you a comprehensive overview of all payment activities.

{% hint style="danger" %}
**Important:** Webhook configuration is required for transaction reporting to function properly.
{% endhint %}

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

<div align="left"><figure><img src="/files/a4TfcZrik4XD0roFW16D" alt=""><figcaption></figcaption></figure></div>


# Checkout Credit Card Form (Pro)

In this tutorial we'll walk you through creating a straightforward payment form with a credit card field. This form is designed to facilitate event registrations, Here's a step-by-step guide.

<div align="left"><figure><img src="/files/ThUyhP7hBWfxq2AwgHxK" alt=""><figcaption></figcaption></figure></div>

> In this sample, both the <mark style="color:red;">**Elementor Pro**</mark> and our <mark style="color:red;">**Payment Addons Pro**</mark> are required

### Create form fields

1. To begin, create a new page or post, and use Elementor for editing.
2. Next, drag and drop the Elementor Form onto your page (you can search for it using the keyword "form" or find it under the "PRO" category)

![](/files/o0CqNDhkYzq3wjucPcuz)

3. Add form fields one by one, such as Email, First Name, Last Name, and Event. It's important to assign meaningful **IDs** to the email and event fields, as they will be used as the customer's email and payment price, respectively. These IDs are crucial because they will be linked with **shortcodes**.

![](/files/n9yHZ5Psjundy2y5sxkU)

![](/files/caKsPuHKGksdW2fgFZtG)

{% hint style="info" %}
You can replace the **Event** field with any field that represents a price, whether it's a fixed value like in this example or a number input field that allows users to enter a dynamic price. The key is to ensure that the field is properly linked to the payment process.
{% endhint %}

4. Add credit card field

Continue above, we can insert a <mark style="color:red;">**Credit Card**</mark> type field which is exclusively available for our Professional plan users

![](/files/ABFsH1AMN50FsH3LW5L7)

Our form UI settings are now complete and will look similar to the example below. However, the payment form is not yet complete, as we still need to add the form submission action to process payment collection.

<div align="left"><figure><img src="https://1471993180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6FFXqELmFsGrfOxBauwC%2Fuploads%2FxR6dkNchhWd9R4yC66zZ%2Fimage.png?alt=media&#x26;token=f2dd7cfa-f272-4fef-84af-04c0241d4c0c" alt=""><figcaption></figcaption></figure></div>

### Form submission actions

Similar to other built-in submissions like '*collection submission'***, '***Email', 'Redirect', etc,* we provide a payment submission called \`<mark style="color:red;">**Credit Card submission**</mark>\` to handle the checkout-related collection.

![](/files/GjvUlR7UtIDL017uL2MG)

Here we keep 'Collect Submissions' and we also add the <mark style="color:red;">**Credit Card submission**</mark>, the submission section will be shown below:

![](/files/rYt9EeqTrgnmNcHZ0E8I)

In this section, we can specify the supported **customer name** which can be combined by `last_name` and \`first\_name\` fields as full name, the **custom email** field that links to the email field we defined earlier, and the **Payment Type** field that consists of three options: <mark style="color:red;">**one-time**</mark>, <mark style="color:red;">**subscription**</mark>, and <mark style="color:red;">**flex**</mark>.

* One-time - For only standalone purchases
* Subscription - For only recurring subscriptions
* Flex - Collects either one-time or subscription based on conditional logic

When you choose a specific payment type, the corresponding settings for one-time or subscription payments will become active. For instance, if a checkbox with the ID `sub-checked` is selected during submission, the payment will be considered a subscription and will use the subscription settings.

![](/files/63ltIEwZDrFCWU4S80Sn)

### **One-Time Payment Settings**

If the Payment Type is chosen as One-Time or the subscription field condition is not met under Flex mode, the payment will be treated as a one-time payment. Configure the following settings:

<div align="left"><figure><img src="/files/Y0mYQ1aDxyKS0GO8nmjP" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
If desired, we can specify a fixed value for the **amount** field instead of using a shortcode. For instance, we can set a fixed value of 40 for the amount field.

For **Quantity** field, we set it as 1 because we don't want it dynamic, but it's free to use it as a shortcode as well.

For **Product** field, it will help to display the transaction description in the stripe dashboard so you can see which payment is for. (Tips: the form shortcode is supported for these fields.)
{% endhint %}

### Subscription **Payment Settings**

When the Payment Type is chosen as Subscription or the subscription field condition is met under Flex mode, the payment will be considered a subscription. Configure the following settings:

![](/files/C0v0e514KP943wEBP4Et)

All of these fields support shortcodes and we can leverage them to build some customized forms with credit cards to do recurring payments:

<div align="left"><figure><img src="/files/qA9gcJ1TMSIWZ3R0JlVv" alt=""><figcaption></figcaption></figure></div>

#### Using stripe price

![](/files/7Vfq4yLSZrbW0t9fatE1)

We recommend using predefined Stripe prices for recurring payments if the price is fixed. This allows customers to select from your existing prices in the Stripe dashboard during checkout.

The alternative is creating inline recurring payments as above section, which generates a new product and price on every transaction, even if the details are the same. This can lead to duplicated products and make inventory management more difficult.

With Stripe prices, a customer simply chooses from your listed prices, streamlining the checkout process. And you maintain one consistent product catalog in Stripe to manage pricing, inventory, and reporting.

The <mark style="color:red;">**Price ID**</mark> field is a list fetching from the stripe product's price list, selecting one means the check out will use this price to checkout all the time.&#x20;

In some cases, the subscription price mean chosen by end-user such as in pricing-table or from a dropdown, if that so, we can specify the <mark style="color:red;">**Price ID field**</mark> as shortcode to make it flexible

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

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

#### Subscription occurrences

<div align="left"><figure><img src="/files/tD76fRScI0pYmiH6QTvv" alt=""><figcaption></figcaption></figure></div>

The recurring occurrences field allows specifying the number of times a subscription payment should be repeated. This is useful for temporary donation campaigns or subscriptions with a set duration.

For example, vendors could allow users to choose a 6-month, $10 per month recurring donation by adding a \[field id="donate-times"] merge tag in this field. The form would populate the number of occurrences dynamically based on the user's input.

If no value is entered, the payments will continue indefinitely until manually canceled. This flexibility supports both ongoing and fixed-duration memberships or donations.

### Testing

{% hint style="info" %}
Success: 4242424242424242 Any 3 digits Any future date

Decline:  4000000000000002 Any 3 digits Any future date

For more testing cards sample, please refer <https://stripe.com/docs/testing#use-test-cards>
{% endhint %}

<div align="left"><figure><img src="/files/NHqdqrBrUGmH5oJ3NNiF" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
To customize the form success message, please go to form **Additional Options** section and check on Custom messages
{% endhint %}

If everything goes well, you should see the below result:

* [x] The form data will be saved in Elementor-> submission (because of the above collection submission)
* [x] The translation record will be shown in your [Stripe Dashboard](https://dashboard.stripe.com/test/payments).

<div align="left"><figure><img src="/files/5y6YktlA4IdzPL64JvvG" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/rZWkGsV8TIHR7FePJqBY" alt=""><figcaption></figcaption></figure></div>

**Ok, That's it!**&#x20;


# Checkout Element Form (Pro)

In this tutorial we'll walk you through creating a straightforward payment form with a payment element field. This form is designed to accept multiple payment methods, Here's a step-by-step guide.

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

{% hint style="warning" %}
In this sample, both the <mark style="color:red;">**Elementor Pro**</mark> and our <mark style="color:red;">**Payment Addons Pro**</mark> are required
{% endhint %}

### Create form fields

1. To begin, create a new page or post, and use Elementor for editing.
2. Next, drag and drop the Elementor Form onto your page (you can search for it using the keyword "form" or find it under the "PRO" category)

<div align="left"><figure><img src="/files/CHIcv7ZQJGJxM8obTduS" alt=""><figcaption></figcaption></figure></div>

3. Add form fields one by one, such as Email, Name, Quantity, and Event. It's important to assign meaningful **IDs** to the email and event fields, as they will be used as the customer's email and payment price, respectively. These IDs are crucial because they will be linked with **shortcodes**.

<div align="left"><figure><img src="/files/GlNZwozDgdCQL4frS18z" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/uEpUGX7tSafVR7aDIpq7" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
You can replace the **Event** field with any field that represents a price, whether it's a fixed value like in this example or a number input field that allows users to enter a dynamic price. The key is to ensure that the field is properly linked to the payment process.
{% endhint %}

### Add Payment Element field

Continue above, we can insert a <mark style="color:red;">**Payment Element**</mark> type field which is exclusively available for our Professional plan users

<div align="left"><figure><img src="/files/N5BzdbPxD32zZgbJbqIc" alt=""><figcaption></figcaption></figure></div>

<div data-full-width="false"><figure><img src="/files/8g1dXJ5Gs6k7PQOAvgl7" alt=""><figcaption></figcaption></figure></div>

Our form UI settings are now complete and will look similar to the example below. However, the payment form is not yet complete, as we still need to add the form submission action to process payment collection.

### Form submission actions

Similar to other built-in submissions like '*collection submission'***, '***Email', 'Redirect', etc,* we provide a payment submission called \`<mark style="color:red;">**Payment Element submission**</mark>\` to handle the checkout-related collection.

Once we select the action, two sections will show up below and I will explain them one by one:

* [x] Payment Element UI
* [x] Payment Element Submission

<div align="left"><figure><img src="/files/eZtGoP7DKHoTcKGfv8ID" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/PGVQMBpPGIWcitG4B4JO" alt=""><figcaption></figcaption></figure></div>

### Payment Element UI

![](/files/jz1RlTDEg2oLb7s4tyrk)

#### Google Pay & Apple Pay

Whether to append wallets like Apple Pay or Google Pay within payment methods.

{% hint style="warning" %}
1\), We need to activate Google & Apple Pay in Stripe payment method setting <https://dashboard.stripe.com/settings/payment_methods>

2\), The Apple Pay needs domain verification, you can follow the stripe guide between to verify it
{% endhint %}

<div align="left"><figure><img src="/files/6Hx7DzP8DAm3eIrczIny" alt=""><figcaption></figcaption></figure></div>

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

#### Payment Methods

By default, the stripe checkout page will list all available payment methods in which your stripe account is activated. If you want only to allow some of them, you can choose them here.

{% hint style="warning" %}
Some of the payment methods may become unavailable if they do not support the currency.
{% endhint %}

#### Payment Methods Order

Customize the default payment method order. Unspecified methods display after defined ones (e.g. Card & Google Pay means Card first, then Google Pay and others).

#### Theme

Three themes supported so far: Stripe, Night, Flat

<div align="left"><figure><img src="/files/fBG6MhtT3FaOo6vLTFZs" alt=""><figcaption></figcaption></figure></div>

#### Layout

Customize the Payment Element’s layout to fit your checkout flow: Two layouts supported so far: **Tabs**, **Accordion**

<figure><img src="/files/6BRqJi3E8EsGjgKXUlyM" alt=""><figcaption></figcaption></figure>

#### Default Collapsed

Controls if the Payment Element renders in a collapsed state.

<div align="left"><figure><img src="/files/OYtKaR1NnqVigEnDKYcQ" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/qFjZ0qbssvFa79gp7NQQ" alt=""><figcaption></figcaption></figure></div>

#### Include Radio (Only for Accordion layout)

<div align="left"><figure><img src="/files/T6lwtGh1PZLgiuvfpWO7" alt=""><figcaption></figcaption></figure></div>

#### Include Spaces (Only for Accordion layout)

<div align="left"><figure><img src="/files/t829TUUhGGt9exZEJDWs" alt=""><figcaption></figcaption></figure></div>

***

### Payment Element Submission

All the configurations are the same as the Credit Card Form Submission, please refer to the form submission section for a detailed explanation:

{% embed url="<https://docs.payaddons.com/elements/checkout-credit-card-form-pro#form-submission-actions>" %}

<div align="left"><figure><img src="/files/gqTWSNdc68hLIAXg7Rd1" alt=""><figcaption></figcaption></figure></div>


# Checkout Redirect Form (Pro)

The powerful form checkout redirects to a secure Stripe-hosted checkout page and supports multiple payment methods, one-time and recurring payments, coupons, taxes, and more.

<figure><img src="/files/4DyIzWCGNfvsRgNXAkAe" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In this sample, both the <mark style="color:red;">**Elementor Pro**</mark> and our <mark style="color:red;">**Payment Addons Pro**</mark> are required
{% endhint %}

### Compare with Checkout Form

Compared to the previous, this <mark style="color:red;">**Checkout Redirect Form**</mark> have below features:

* [x] More custom fields, such as user email, price, frequency, quantity, currency, product, etc.
* [x] More payment methods, like EPS, Giropay, Sofort, iDeal, Alipay, Apple/Google Pay, WeChat.
* [x] Using a secure Stripe-Hosting checkout page that can be customized with your Brand.
* [x] One-Time & Recurring Pay.
* [x] Coupon, Stripe-Tax.

{% hint style="info" %}
**The webhook is required** if you want to either send the native Elementor form email or save the submission to the database.
{% endhint %}

### Create Form Fields

1. To get started, create a new page or post, and edit it using Elementor.
2. Next, drag and drop the Elementor Form onto your page (you can search for it using the keyword "form" or find it under the "PRO" category)
3. Add form fields one by one, such as Email, Quantity, Price, etc. It's important to assign meaningful **IDs** to the email and event fields, as they will be used as the customer's email and payment price, respectively. These IDs are crucial because they will be linked with **shortcodes**.

<div align="left"><figure><img src="https://1471993180-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6FFXqELmFsGrfOxBauwC%2Fuploads%2FiZAWOwspvuv6ME8N1ZFI%2Fimage.png?alt=media&#x26;token=01990637-ccbc-45c3-ba1d-12b0fdcaa347" alt=""><figcaption></figcaption></figure></div>

![](/files/74VF4PKkvshAEI0xWWeY)

### Form submission actions

Similar to other built-in submission options such as 'Collection Submission', 'Email', and 'Redirect', we offer a payment submission called the <mark style="color:red;">**`Checkout Redirect Submission`**</mark> to manage the checkout-related collection process. Once this action is added, two new sections will appear: the **Stripe Checkout Redirect** section, which provides payment-related information, and the **Stripe Checkout Redirect Fields** section, which allows for easy field mapping with forms using shortcodes.

![](/files/29JYAjzDo3xfrNthlNJV)

![](/files/YgQXEir5ARMucbflON4X)

### Testing

{% hint style="info" %}
Success: 4242424242424242 Any 3 digits Any future date

Decline:  4000000000000002 Any 3 digits Any future date

For more testing cards sample, please refer <https://stripe.com/docs/testing#use-test-cards>
{% endhint %}

When you click the submit button, you will be redirected to a secure checkout page hosted by Stripe, where you can complete your transaction using the testing account provided above.

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

Once you have filled in the payment information and clicked the 'Subscribe' button, you will be redirected to the 'Success' page that you configured in the previous section. On this page, you can reuse your [Confirmation Summary](/elements/confirmation-summary) widget to collect payment receipt information.&#x20;

<figure><img src="/files/32lsxicULZxhHgtnfqd7" alt=""><figcaption></figcaption></figure>


# Email Configuration

How to set up email notifications and customer invoices for your payment.

In most cases, site owners want to receive notifications during payment processing, such as when a payment is successful or failed, and even do some automation tasks with email.

### Prerequisites

* [x] WP SMTP provider works
* [x] [Webhook Configuration](/getting-started/webhook-configuration)

### 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.

<div align="left" data-full-width="false"><figure><img src="/files/1XCKFqQNqXjYIjIcx9o4" alt=""><figcaption></figcaption></figure></div>

{% 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:

> <mark style="color:red;">**Note**</mark>: Some fields may be empty depending on the payment type - for example, shipping details may be empty if no shipping required when collect payment information

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

{amount}
{description}
{currency}
{created}
{format_date}
{format_time}
{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 (Pro Only)

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 %}

<div align="left"><figure><img src="/files/bXW9r4Axd9uKJIpB9vr7" alt=""><figcaption></figcaption></figure></div>

### Customize Default Template Colors (Pro Only)

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

We provide a default template for email notifications, but you can easily customize its theme to match your brand’s colors. The following color settings are available:

* **Base Color**: `#4a90e2`
* **Background Color**: `#f7f7f7`
* **Body Background Color**: `#ffffff`
* **Body Text Color**: `#3c3c3c`

{% hint style="success" %}
The body content remains unchanged and can be configured in the email content editor (available for all three email types).
{% endhint %}

Once you unlock this feature, you’ll see the **Customize Email Template** section, where you can modify the supported colors.

To style button links as shown above, switch the editor to **Code Mode** and add the class `button` to your link:

```html
<a class="button" href="{receipt.url}" target="_self">View Receipt</a>
```

<div align="left"><figure><img src="/files/715EZP09LREw3NVRhsz0" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/DuoPfVHs8050vKuCKjnK" alt=""><figcaption></figcaption></figure></div>

### Override the Default Template Layout (Pro Only)

<figure><img src="/files/1OJLJPPsjkv86qnCGGO0" alt=""><figcaption></figcaption></figure>

If you want more control over your email template—beyond just colors—you can fully customize the layout, including headers, footers, and other structural elements.

To override the default template, place an HTML file named `default.html` in your theme folder at:

&#x20;**{themefolder}/elementor-pay-addons/emails/default.html**&#x20;

This custom template supports all email and payment merge fields.

A special merge field, `{{__email_body__}}` (wrapped in double braces), is reserved for dynamic content replacement. This ensures the email body you configure in the editor is automatically inserted into your custom template.

```html
<!-- Your custom template structure -->  
<div class="email-container">  
    {{__email_body__}}  
</div>  
```

A full example file:

<div align="left"><figure><img src="/files/0v1j1l5D9opcA2vWyfat" alt=""><figcaption><p>payaddons custom template</p></figcaption></figure></div>

```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" lang="en">
  <head>
    <link
      rel="preload"
      as="image"
      href="https://payaddons.com/wp-content/uploads/2025/01/logo-blue.png" />
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    <meta name="x-apple-disable-message-reformatting" />
    <!--$-->
  </head>
  <body
    style='background-color:#f6f9fc;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Ubuntu,sans-serif'>
    <table
      align="center"
      width="100%"
      border="0"
      cellpadding="0"
      cellspacing="0"
      role="presentation"
      style="max-width:37.5em;background-color:#ffffff;margin:0 auto;padding:20px 0 48px;margin-bottom:64px">
      <tbody>
        <tr style="width:100%">
          <td>
            <table
              align="center"
              width="100%"
              border="0"
              cellpadding="0"
              cellspacing="0"
              role="presentation"
              style="padding:0 48px; color:#525f7f">
              <tbody>
                <tr>
                  <td>
                    <img
                      alt="payaddons"
                      height="21"
                      src="https://payaddons.com/wp-content/uploads/2025/01/logo-blue.png"
                      style="display:block;outline:none;border:none;text-decoration:none"
                      width="100" />
                    <hr
                      style="width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0" />
                    <p
                      style="font-size:16px;line-height:24px;color:#525f7f;text-align:left;margin-bottom:16px;margin-top:16px">
                      Thanks for submitting your account information.
                      You&#x27;re now ready to make live transactions with
                      Stripe!
                    </p>
                    <hr
                      style="width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0" />
                    {{__email_body__}}
                    <p
                      style="font-size:16px;line-height:24px;color:#525f7f;text-align:left;margin-bottom:16px;margin-top:16px">
                      — The payaddons dev team
                    </p>
                    <hr
                      style="width:100%;border:none;border-top:1px solid #eaeaea;border-color:#e6ebf1;margin:20px 0" />
                    <p
                      style="font-size:12px;line-height:16px;color:#8898aa;margin-bottom:16px;margin-top:16px">
                      Stripe, 354 Oyster Point Blvd, South San Francisco, CA
                      94080
                    </p>
                  </td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
    <!--/$-->
  </body>
</html>

```


# Decimal Form Field (Pro)

A decimal type field for Elementor form

When building payment forms in Elementor, collecting numeric amounts can be tricky with the standard field types. The "**text**" type doesn't validate numbers, while the "**number**" type only allows integers.

To solve this common need for decimal payment values, we added a dedicated "<mark style="color:red;">**Decimal**</mark>" field in our plugin.

This new field type only allows valid numeric decimal entries like 9.99. It will validate values entered are in the proper format - preventing invalid text or improperly formatted decimals.

<div align="left"><figure><img src="/files/xMXsjpMsnuwALKkIekvn" alt=""><figcaption></figcaption></figure></div>


# Customize confirmation page (Pro)

Redirect to your custom a Confirmation or Thank you Page with receipt Information after payment

As you may know, we currently offer a[ **confirmation summary**](/elements/confirmation-summary) element that displays a summary of the user's payment details after they complete a transaction. However, this section has a fixed design, allowing only limited customization of its styles. In many cases, users request the ability to display a fully customized confirmation or thank-you page.

To address this, we now provide a receipt shortcode that allows you to design a confirmation page that seamlessly aligns with your site's style and branding. This feature gives you the flexibility to create a completely tailored experience for your users.

### Redirect to a Custom Confirmation Page

#### 1. Create Your Confirmation Page

Create a new page where you want to display the detailed payment confirmation.

#### 2. Add the Receipt Shortcode

Insert the following shortcode into your page:

```
[epa-receipt]
```

#### 3. Insert merge fields

You can customize your confirmation page by incorporating various supported tags to display transaction details such as by using the below-supported merge fields:

Insert any of the below tags into your HTML pages:&#x20;

```
{description}
{amount}
{currency}
{format_date}
{format_time}
{amount_currency}
{customer.email}
{customer.name}
{customer.phone}}
{customer.address.country}
{customer.address.state}
{customer.address.city}
{customer.address.line1}
{customer.address.line2}
{customer.address.postal_code}
{billing_detail.email}
{billing_detail.name}
{billing_detail.phone}
{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}
{payment_method.type}
{payment_method.card.brand}
{payment_method.card.last4}
{receipt.url}
```

#### 4. Metadata merge field (advanced)

Metadata is a powerful feature that allows you to store all the submitted form data, which can be leveraged to populate 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 %}

<div align="left"><figure><img src="/files/bxtx1vKDzVXU0EF5HsAu" alt=""><figcaption></figcaption></figure></div>

### Example overview

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

To implement a basic confirmation page, add a Custom HTML block with your desired layout. Here's a sample template:

```html
<style>
  .epa-confirmation {
    max-width: 800px;
  }

  .epa-confirmation__thank-you {
    font-size: 18px;
    margin-bottom: 30px;
  }

  .epa-confirmation__section {
    background-color: #f6f9fc;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 30px;
  }

  .payment-detail {
    display: flex;
  }

  .payment-detail>div {
    margin-right: 2em;
    text-transform: uppercase;
    font-size: .715em;
    line-height: 1;
    border-right: 1px dashed #d3ced2;
    padding-right: 2em;
    margin-left: 0;
    padding-left: 0;
    list-style-type: none;
  }

  .payment-detail>div:last-of-type {
    border: none;
  }

  .payment-detail>div strong {
    display: block;
    font-size: 1.4em;
    text-transform: none;
    line-height: 1.5;
  }
</style>
<section class="epa-confirmation">
  <h4 class="epa-confirmation__thank-you">Thank you. Your payment has been received.</h4>
  <h4>Summary</h4>
  {description}
  <h4>Payment details</h4>
  <div class="epa-confirmation__section payment-detail">
    <div>DATE: <strong>{format_time}</strong></div>
    <div>EMAIL: <strong>{customer.email}</strong></div>
    <div>TOTAL: <strong>{amount_currency}</strong></div>
    <div>PAYMENT METHOD: 
      <strong>
        {payment_method.card.brand} - {payment_method.card.last4}
      </strong>
    </div>
  </div>

  <h4>Billing details</h4>
  <div class="epa-confirmation__section">
    <div>{billing_detail.name}</div>
    <div>
      {billing_detail.address.line1} <br/>
      {billing_detail.address.line2} <br/>
      {billing_detail.address.city}, {billing_detail.address.state} {billing_detail.address.postal_code} <br/>
      {billing_detail.address.country}
    </div>
    <div>{billing_detail.email}</div>
    <div>{billing_detail.phone}</div>
  </div>
  <p></p>
  <p><span>You can download the </span><a href="{receipt.url}" target="_self"><span>receipt</span></a> here.</p>
</section>
```

### Configure Success URL

All of our elements and forms are designed to allow you to specify a success redirection. You can easily assign your custom confirmation page by setting it as the success or return URL.

<div align="left"><figure><img src="/files/0XpP7D18tpNvI9WVEFes" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/0cXzvgivGkRXTrKrwvAC" alt=""><figcaption></figcaption></figure></div>


# Developer APIs

Leverage our built-in APIs or WordPress filters for some advanced usages

### WordPress Filters

{% code overflow="wrap" %}

```php
apply_filters( 'elementor_pay_addons/forms/record/actions_before', $record, $this )

apply_filters('elementor_pay_addons/api/checkout_session_args', $session);

apply_filters( 'elementor_pay_addons/webhook/event', $event);

apply_filters( 'elementor_pay_addons/form/create_customer', $customer_params );

apply_filters( 'elementor_pay_addons/form/create_payment_intent', $payment_intent );

apply_filters('elementor_pay_addons/form/create_subscription', $subscription_params);

apply_filters( 'elementor_pay_addons/form/create_checkout_session', $checkout_session );

apply_filters('elementor_pay_addons/email/format_string', str_replace($find, $replace, $string), $this);

apply_filters('elementor_pay_addons/email/headers', $header, $this->id, $this->object, $this);

apply_filters('elementor_pay_addons/email/from_name', get_option('epa_email_sender_from_name'), $this, $from_name);
```

{% endcode %}

### Access Stripe Instance in front-end JS

{% hint style="danger" %}
Make sure to fetch the form handlers after DOM is ready.
{% endhint %}

Let's say you want to get Stripe [payment element](https://docs.stripe.com/js/element/payment_element) in [Checkout Element Form](/elements/checkout-element-form-pro):&#x20;

{% code overflow="wrap" %}

```javascript
jQuery('.elementor-widget-form')[0].epaFormHandler.stripeElement.getElement('payment')
```

{% endcode %}

Let's say you want to get Stripe [card element](https://docs.stripe.com/js/elements_object/create_element?type=card) in [Checkout Credit Card Form](/elements/checkout-credit-card-form-pro):&#x20;

{% code overflow="wrap" %}

```javascript
jQuery('.elementor-widget-form')[0].epaFormHandler.stripeElement.getElement('card')
```

{% endcode %}

Then we can execute the Stripe native method such as update in the front end.

{% code overflow="wrap" %}

```javascript
jQuery('.elementor-widget-form')[0].epaFormHandler.stripeElement.update({ amount: total });
```

{% endcode %}


# Dynamic Tag PHP

When pricing or quantity requires complex calculations, our Dynamic Tag feature lets you run PHP code directly within payment fields.

{% hint style="danger" %}
This feature requires the Elementor Pro license
{% endhint %}

### Inserting a PHP Dynamic Tag in Payment Fields

Follow these steps to implement a dynamic PHP tag in your payment form:

1. Create an Elementor form and add your desired payment field (such as credit card).

<figure><img src="/files/5dgPaDjaIkXGbqLeQ47t" alt=""><figcaption></figcaption></figure>

2. In the "Actions After Submit" list, add "Credit Card Submission". This will display the Credit Card Submission tab where all your payment settings are located.
3. Click on the Amount field's dynamic tag button, then scroll down the list of available tags until you find "Code(php)" in the Elementor Stripe Addons category.

<div align="left"><figure><img src="/files/xf6ClE4CUYiy8c95bh6n" alt=""><figcaption></figcaption></figure></div>

4. Click the gear (settings) button to write your PHP code. Ensure that your code returns a numeric value representing the final quantity. For example:

```
return 2*5;
```

<div align="left"><figure><img src="/files/Bg8hlPBJd2fJ7VN3Eow2" alt=""><figcaption></figcaption></figure></div>

### Testing Your Dynamic Tag

With the configuration shown above, you can see how dynamic values affect your payment processing:

* The amount is fixed at €19.90
* The quantity is dynamically calculated by our PHP code, which returns a value of 10
* Therefore, the total price charged would be €199.00 (€19.90 × 10)

This feature gives you powerful flexibility when dealing with complex pricing scenarios in your Elementor forms.

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

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


# Dynamic field by request parameter

When pricing or quantity requires pre-fill values from request parameters such as URL, our plugin supports retrieving these values and filling them directly into payment fields.

### How to Use a URL Query Parameter as a Payment Price

The core idea is to add a hidden form field and leverage Elementor Dynamic tags with Request Parameters to prefill values from the URL. Then, in your payment settings, you can use **shortcodes** to link the form value with your payment process.

### Step-by-Step Instructions:

1. Create a hidden field for the amount or even the price ID for a subscription

<div align="left"><figure><img src="/files/JWAkQKthEZTJXuMqlgvz" alt=""><figcaption></figcaption></figure></div>

2. Given a meaningful field ID and click the dynamic tag icon in the Default Value input box

<div align="left"><figure><img src="/files/zRAmoxdIzZqYAiQgIOYa" alt=""><figcaption></figcaption></figure></div>

3. Choose **Site → Request Parameter** from the dynamic tag list and select GET type

<div align="left"><figure><img src="/files/ddm2g2OSo9rrf0A5pkV8" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/zMYBPjBGxNTwALOWRVWV" alt=""><figcaption></figcaption></figure></div>

4. Copy the generated shortcode, then in the "Actions After Submit" list, add "Credit Card Submission" - this will display the Credit Card Submission tab where all your payment settings are located
5. Find the amount field in the payment settings and paste the shortcode.

<div align="left"><figure><img src="/files/UOTV0mjNY1lKRlFRV8OU" alt=""><figcaption></figcaption></figure></div>

### Testing by giving an amount parameter in the URL

Test your setup by adding a `amount` parameter with a value in the URL, such as: <https://example.com/?p=1336&amount=100>

<figure><img src="/files/6bsCjUS9Z6ncdKDtlRx0" alt=""><figcaption></figcaption></figure>


