# Welcome 👋

This is the full documentation for Payment Page - the easiest way to accept online payments for WordPress.

### Thanks for using Payment Page!&#x20;

We're glad you're here, and we're here to support you 100%.&#x20;

Payment Page was built for entrepreneurs and businesses of all sizes that want to accept payments as easily as possible through their WordPress website.

Feel free to download the [free version](https://wordpress.org/plugins/payment-page/) from WordPress.org or learn about [paid features](https://paymentpageplugin.com/pricing/?utm_source=welcome-to-payment-page\&utm_medium=docs\&utm_campaign=docs), like subscription pricing, additional templates to help get started, and more.&#x20;

If you have any feature requests, please reach out to support.&#x20;

### Here’s the best way to get started using Payment Page.&#x20;

{% content-ref url="/pages/-MdJvPiDo07MyP-0DTyn" %}
[Quick Setup](/getting-started/setting-up-payment-page)
{% endcontent-ref %}

The best way to get in touch with our team is by [opening a ticket](https://gauchoplugins.freshdesk.com/support/tickets/new) or emailing <support@gauchoplugins.com> with the details of your question, feature request, bug report, or any other concerns. We’ll reply as quickly as possible, usually within 24 hours Monday - Friday. &#x20;


# Quick Setup

Here is the Quick Setup process for the Payment Page WordPress plugin. We've broken down the steps in detail so you know what everything does.

Once the plugin has been properly [installed and activated](https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/), you'll be directed to the following Quick Setup steps under the Payment Page menu (#1 in screenshot). &#x20;

### Connect your Payment Gateway

Currently, Stripe and PayPal are supported, so you can connect either of those payment gateways by clicking the corresponding buttons (#2 in screenshot).&#x20;

![Payment Page Quick Setup](/files/EubU0fG6F0fGlOJeCHmQ)

You can switch to LIVE and TEST modes at any time. The switchers control LIVE and TEST modes globally for all payment forms on your site (#3 in screenshot).

{% hint style="warning" %}
Payment Gateways must be connected in LIVE and TEST modes independently.&#x20;
{% endhint %}

Once you've connected your payment gateway in both LIVE and TEST modes, be sure to activate all the relevant payment methods you want to use. Click to expand the payment methods section (#4 in screenshot), and check the boxes next to each payment method (#5 in screenshot).&#x20;

![Activating Payment Methods](/files/jrzdG5rBuvKKZr39BgH6)

{% hint style="info" %}
The [free version](https://wordpress.org/plugins/payment-page/) of Payment Page supports **one-time payments** with Credit + Debit Cards for both Stripe and PayPal.&#x20;

Additional **payment methods** for each gateway and **recurring subscription payments** are supported on the [PRO Plan](https://paymentpageplugin.com/pricing/) or higher.&#x20;
{% endhint %}

After you've finished connecting the payment gateway, the next step is to Select a Template.

### Select a Template

There are free and paid [Templates](https://paymentpageplugin.com/templates/) included with Payment Page for you to easily get started with a beautiful page and form to accept payments from customers.&#x20;

{% hint style="warning" %}
Templates all require the free or paid version of [Elementor](https://elementor.com/?ref=12436) to be installed at this point in time. We may support other page builders later.&#x20;
{% endhint %}

If you don't have Elementor installed, the free version of Elementor will be automatically installed and activated once you click Install Elementor Now.&#x20;

![Select a Template - Install Elementor Now](/files/QfXPmJQqOfhahnckZLrk)

Next, click "Import" to import your preferred template and start editing, or click "Upgrade" to access the paid templates. The green checkmark indicates that Elementor is installed.&#x20;

![Importing a Template](/files/y0R4O84K3iZSGWZAlwnv)

### Manual Setup

If the import process doesn't work for any reason, or you simply want to start fresh and fully customize your Payment Page, you can drag and drop the Payment Page Form Widget onto any Elementor page:

<figure><img src="/files/teuep9rNMU9309SFa5VI" alt=""><figcaption><p>Payment Page Form Elementor Widget</p></figcaption></figure>

### Customize your Payment Page

Hover over your payment form, and click the blue box with the pen icon to start [customizing your Payment Page settings](https://docs.paymentpageplugin.com/pricing-options/plans-pricing-options) with the powerful Elementor Widget.&#x20;

Start editing and designing your payment form by selecting the Content, Style, or Advanced tabs in the upper left corner (#7 in screenshot).&#x20;

![Customizing a Payment Page](/files/4SiBG8XoHek2szI0CdpD)

After customizing your payment page, click on the green button on the lower left side to "Publish" or "Update" changes (#8 in screenshot).&#x20;

On the upper left corner, click on the three horizontal lines, and go to "View Page" to see your published Payment Page (#9 in screenshot).

![Viewing Published Page in Elementor](/files/stoWw04Rv6XBMxjvnWbt)

Read more to learn about the customization options and features available with Payment Page.

{% content-ref url="/pages/-MdJxruCVAVJI98QbpfO" %}
[Plan & Pricing Options](/pricing-options/plans-pricing-options)
{% endcontent-ref %}

{% content-ref url="/pages/-MdJxogGoEcufXVt-oJ8" %}
[Style & Design Options](/styling-options/style-design-options)
{% endcontent-ref %}


# Troubleshooting

The section covers all the steps for Troubleshooting the Payment Page WordPress plugin.

Payment Page is meant to be extremely easy to use. However, as with any software, bugs or conflicts can arise. This guide is meant to give you a thorough overview of everything you can attempt to resolve issues you might have when using the plugin.&#x20;

### Troubleshooting Steps

If you encounter any errors, please kindly follow the steps below:

1. Ensure you're using the latest versions of A) the Payment Page plugin, B) all integrated plugins (E.g. - Elementor), and C) WordPress. Before updating, you should always have a backup of your site available.&#x20;
2. Ensure you have an SSL security certificate set up properly for your site. The plugin requires secure connections to 3rd party payment gateways, like Stripe and PayPal, as well as to our API and our website to be able to import our notifications or the latest templates.&#x20;
3. Clear the cache at all levels to ensure you're seeing the latest version of your site (possible caching may include server-side, website via caching plugins, CDN (e.g. - Cloudflare), and browser caching. All 4 levels are relevant and can have a big impact on what you're seeing when visiting your site.&#x20;

If the issues continue, more aggressive steps include:

1. Temporarily disable all caching on the website, including server-side caching, any caching plugins, and clearing your browser cache or using an incognito window. Disable or Pause your CDN completely on the site. Then, follow step #2.&#x20;
2. Temporarily disable all other plugins, except the required ones (e.g. - Elementor), and activate a default WordPress theme. If that resolves the issue, reactivate the plugins and desired theme one-by-one and run a test each time. Once you discover the conflicting plugin or theme, contact support and report the conflict so we can investigate it further and see if we need to release a fix or contact the other team to request a fix in their plugin. &#x20;

If the issues persist, please open a support ticket by following the instructions below.&#x20;

### Opening a Support Ticket

Our support team is available Mon - Fri, 9am - 6pm PST. Please note that we strive to respond to all requests within 24 hours, excluding weekends. You can open a support ticket on our website at <https://payment.page/support/.&#x20>;

When opening a support ticket, please keep in mind that our team needs to fully understand what you're experiencing. The best way to do that is by providing as many details as possible, so here is a list of the items that will help us help you:&#x20;

1. Please be sure you've attempted all of the steps above that you possibly can. As a WordPresser for 10+ years and the Founder of Payment Page, I can let you know from personal experience that these Troubleshooting Steps generally resolve 99% of issues and are the most efficient way to a solution. Therefore, all of these items should be ruled out completely before involving our team. \[Required]
2. Record a video explaining how to reproduce the issue or take a screenshot along with a detailed written explanation of how to reproduce the issue. \[Required]
3. Share the URL of the page with the issue. \[Required]
4. Confirm the:
   1. PHP Version
   2. WordPress Version
   3. Payment Page Version
   4. Elementor Version
5. Share the WP-Admin login URL **and** Administrator-level access of your site by either of the steps below: \[Optional]
   1. Creating a temporary username and password using email <support@payment.page>.&#x20;
   2. Sharing with our team a temporary login access link created via this plugin: <https://wordpress.org/plugins/temporary-login-without-password/>&#x20;
6. FTP/SFTP login details. \[Optional]
7. If you provide login details in Step #5 or Step #6, be 100% sure you have a backup of your site handy. \[Required]


# Plan & Pricing Options

## Customize all these aspects of your Payment Page:&#x20;

* Select how you want your form to be displayed.
* Modify, copy, or add your pricing plans.
* Fill out the fields in the form.
* Enable and disable the currency and subscription selectors.
* Add emails, actions, and submit buttons.

This video shows more about customizing your Payment Page pricing and plans:

{% embed url="<https://www.youtube.com/watch?v=s9lHOCWLT48>" %}
Payment Page Plan & Pricing Options
{% endembed %}


# Subscription & Currency Filters

The function of the subscription frequency and currency selectors is to filter the plans in the pricing dropdown.

The subscription and currency selectors can be easily activated or deactivated in the Elementor widget settings.&#x20;

When activated, the selector will appear at the top of the payment form, like this: &#x20;

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/66008927415/original/N1fsOlK2uVLFsb6l7uSFkIAE7784lE_Q5Q.png?1619557198)

The filter applies to all the options based on all plans created, so, when the selectors are deactivated, the plans in the pricing dropdown all display at the same time.&#x20;

The subscription and currency selectors can be activated separately, limiting the plans that appear in the dropdown at a given time, and giving you complete flexibility and control over how to display the plans.&#x20;

### Currency Symbol vs Unicode Text

To switch the currency from the "Symbol" vs "Text" version, use the Currency Options in the form builder settings:

<figure><img src="/files/IATsZJrWLUkeSpFjyC9z" alt=""><figcaption><p>Currency Symbol Option in Elementor Currency Options</p></figcaption></figure>


# Custom Payment Amounts

By leaving the pricing field blank on any pricing plan, your customer will be able to enter their desired payment amount, as seen below:

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/66009485671/original/gaBy23ov90gYA3r-nZTBEMYQzDOku5ZCfQ.png?1620349699)

This is a very powerful feature for anyone offering invoices that all have different amounts or allowing customers to choose how much to donate.&#x20;


# Setup Fee

If you're selling a subscription, and you want to have a setup fee or different first payment amount, you can follow the instructions below.

{% hint style="info" %}
Ensure you're using the [PRO Plan](https://paymentpageplugin.com/pricing/) to be able to designate a setup fee.&#x20;
{% endhint %}

When any subscription period is selected, just check the box for "Different first payment amount."&#x20;

![Checkbox for Different First Payment Amount](/files/x2JYdQqnHe4X4pVyPZzd)

{% hint style="danger" %}
Important: The first payment amount cannot be set to 0. That would be considered a free trial, and free trials are not yet supported by Payment Page. This documentation will be updated when it's available. [Reach out to support](https://payment.page/support/) to make a request if you want free trial functionality.&#x20;
{% endhint %}

Once you've enabled the "Different first payment amount," you will also see the corresponding field to display the "First Payment Amount" on the pricing dropdown, and submit buttons:

![First Payment Amount Checkbox](/files/NNhfHga7Ij4TVqFXq9K8)


# Style & Design Options

To design your payment form, there are three options to consider: Style, and Advanced.

1\. Bring out your style.

* Choose from Forms, Pricing Plans, Submit Button, and Dynamic Message.
* Click on your image, heading, and texts - click the blue box with the pen icon to see more options.

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/66002593567/original/GBq0vAeTsZncULp4YLC1MDzi9in9UkVoUg.gif?1607366878)

* Add Margins, Motion Effects, Background, Border, Positioning of your widget, images and texts.
* Choose from the options of responsive visibility.
* Attributes and Custom CSS are available on Elementor PRO.

Click the green button "PUBLISH" or "UPDATE" to save changes and you're done!

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/66002532752/original/_qzv3m2mJDoJgxTLGNSFwwlElsR74IwU1Q.gif?1607115235)

&#x20;


# Stripe

Payment Page supports accepting payments with your Stripe account!

Stripe is a global payment gateway provider for businesses of all sizes. You can register for a free account on stripe.com and only pay for gateway processing fees (subject to change). See supported countries at stripe.com/global.&#x20;

With Stripe's powerful payments API, they've made it possible to accept payments with a wide variety of global payment methods, including Wallets, Bank Transfers, and more.&#x20;

{% hint style="success" %}
Before connecting with any payment gateway, be sure you have an SSL security certificate enabled on your site, and that you're accessing your site via `https.`&#x20;
{% endhint %}

### How to Connect Stripe to Payment Page

You have the option to Connect with Stripe during the Setup Process or in the Payment Gateways tab:&#x20;

![Button to Connect with Stripe](/files/MAnktTPDOsKIVteOENs2)

{% hint style="warning" %}
Stripe must be connected in TEST and LIVE modes independently. After connecting in one mode, you'll need to connect again after switching to the other mode. It is not required to connect in both modes for payments to work.&#x20;
{% endhint %}

On the next page, you'll be prompted to login to your Stripe account. If you're connecting in TEST mode, you'll see a TEST mode badge and an option to "Skip this form."&#x20;

![Connecting with Stripe in TEST Mode](/files/TLftzjP5yaV7QFZ1OreW)

{% hint style="info" %}
Skipping the form allows you to start processing test payments immediately, however, the test payment data will not be stored anywhere. In order to see the test payment data, be sure to connect after logging in first.&#x20;
{% endhint %}

If you connect with a real Stripe account and not by skipping, you'll see your Stripe account name next to the switcher for TEST and LIVE mode. The TEST mode indicator will also change to Yellow to show that TEST mode is connected.&#x20;

![Connected in TEST Mode](/files/EHTHvyrxj7Rsjquysqvp)

To connect in LIVE mode, simply click the switcher and follow the same process. There won't be an option to "Skip this form" in LIVE mode, as LIVE mode requires a real Stripe account to process payments.&#x20;

After the connection is successful, you should see something like this on your connection Status indicator, which indicates that LIVE mode is active, and both modes are connected to Stripe properly.&#x20;

![Connected in LIVE and TEST modes. ](/files/pedYJo8J5cLFsw39fSaP)

### Activating Stripe Payment Methods

To activate specific Stripe Payment Methods throughout your site, click on the left side arrow indicator to expand the results.&#x20;

![Expanding Stripe Section to View All Payment Methods](/files/NkTipcHJQMUknFrBGqu3)

Then, click each checkbox to activate each payment method. This will activate the payment method to be used on any payment forms on your site. You can separately activate each payment method independently on each payment form.&#x20;

{% hint style="warning" %}
Be sure to [activate all payment methods in your Stripe account](https://dashboard.stripe.com/settings/payment_methods) in order for them to work properly.&#x20;
{% endhint %}

![Activating Stripe Payment Methods](/files/5515A37y5lUO3M6OPl66)

For further details about each Payment Method, please check the different sections below:

{% content-ref url="/pages/j4J86Ad6q7a8vqgk13qb" %}
[Credit + Debit Cards](/payment-gateways/stripe/credit-+-debit-cards)
{% endcontent-ref %}

{% content-ref url="/pages/gOtswwG4Kc0iuDmztG3T" %}
[SEPA Direct Debit](/payment-gateways/stripe/sepa-direct-debit)
{% endcontent-ref %}

{% content-ref url="/pages/kDpJezb72NB8einV5wF6" %}
[Google Pay](/payment-gateways/stripe/google-pay)
{% endcontent-ref %}

{% content-ref url="/pages/lKDlUOVPFhcZxs81KRwX" %}
[Apple Pay](/payment-gateways/stripe/apple-pay)
{% endcontent-ref %}

{% content-ref url="/pages/lKDlUOVPFhcZxs81KRwX" %}
[Apple Pay](/payment-gateways/stripe/apple-pay)
{% endcontent-ref %}

{% content-ref url="/pages/MUW1EzjvbBMip71GNraV" %}
[Microsoft Pay](/payment-gateways/stripe/microsoft-pay)
{% endcontent-ref %}

{% content-ref url="/pages/1lSLCOankOMtbXmylURo" %}
[Alipay](/payment-gateways/stripe/alipay)
{% endcontent-ref %}

{% content-ref url="/pages/mxaxTD5kn7m8c3OgHXpA" %}
[WeChat Pay](/payment-gateways/stripe/wechat-pay)
{% endcontent-ref %}


# Stripe Webhook Configuration

Configure Webhook Settings from Stripe in Payment Page with a few easy steps.

Once you've connected in Stripe in LIVE and TEST modes, you'll see the option to configure Webhook Settings.&#x20;

Webhooks are recommended because they simply create a more reliable communication method with Stripe to verify and confirm payments have been processed.&#x20;

{% hint style="warning" %}
Webhook Settings must be configured or LIVE and TEST modes independently. Please follow the instructions for both the LIVE and TEST overlay windows, as they each have unique Webhook URLs.
{% endhint %}

{% hint style="danger" %}
Webhooks must be configured in order for HTTP Requests to work properly.&#x20;
{% endhint %}

![Webhook Settings Links](/files/TLRqdy8bujn0TzUeYcE5)

Go to your [Stripe Webhooks Settings](https://dashboard.stripe.com/webhooks), and enter the Webhook URL for the Endpoint URL and select the `payment_intent.succeeded` event to listen to. Your settings should be configured like this:

![Configured Endpoint URL and Event](/files/F6i23T9Tg3sjTN0zBkbU)

Click Add Endpoint, and then Reveal your Signing Secret:

![Reveal Stripe Signing Secret](/files/mdSuTFO7ym5PxnvAyIkG)

Paste the Signing Secret into the plugin Webhook Settings:

![Webhook Signing Secret](/files/3VV97DUcit1MMFMMyGYC)

Be sure to click Save Settings, and follow the exact same process for both LIVE and TEST modes.&#x20;


# Credit + Debit Cards

The Stripe payment gateway integration supports Credit + Debit Card payments from a wide variety of card providers, including but not limited to:

* American Express
* China UnionPay (CUP)
* Discover & Diners
* Japan Credit Bureau (JCB)
* Mastercard
* Visa&#x20;

{% hint style="info" %}
Payment Page is fully prepared for Strong Customer Authentication (SCA) requirements with [3D Secure 2 (3DS2)](https://stripe.com/docs/payments/3d-secure) enabled for all regions.
{% endhint %}

As Stripe continuously updates their services and adds more card types, Payment Page will adapt accordingly. You can find the latest [supported card brands on Stripe's website](https://stripe.com/docs/payments/cards/supported-card-brands).&#x20;

{% hint style="success" %}
To enable Credit + Debit Card payments, please see [Activating Stripe Payment Methods](https://docs.paymentpageplugin.com/payment-gateways/stripe#activating-stripe-payment-methods).&#x20;
{% endhint %}


# SEPA Direct Debit


# Google Pay


# Apple Pay


# Microsoft Pay


# Alipay


# WeChat Pay


# PayPal

Payment Page currently supports the Standard PayPal payment flow, which includes support for customers with and without PayPal accounts. If customers do not have PayPal accounts, they will have the option to complete payment with any supported credit card.&#x20;

Other PayPal payment methods are coming soon, and the documentation will be filled in accordingly.&#x20;

There are 2 steps to the PayPal setup process:

1. [PayPal Setup](https://docs.paymentpageplugin.com/payment-gateways/paypal/paypal-setup) - Connects your PayPal account in TEST and LIVE modes.&#x20;
2. [PayPal Webhook Configuration](https://docs.paymentpageplugin.com/payment-gateways/paypal/paypal-webhook-configuration) - Ensures payment confirmation for plugin [Form Actions on Submit](https://docs.paymentpageplugin.com/features/form-actions-on-submit).&#x20;

{% content-ref url="/pages/K6MMw3acqVLUZntstjB4" %}
[PayPal Setup](/payment-gateways/paypal/paypal-setup)
{% endcontent-ref %}

{% content-ref url="/pages/Bod2jfj6tc1jwfGhR9ks" %}
[PayPal Webhook Configuration](/payment-gateways/paypal/paypal-webhook-configuration)
{% endcontent-ref %}


# PayPal Setup

Accepting PayPal payments takes a few simple configuration steps. Here's everything you need to know.

To set up PayPal properly, please configure TEST and LIVE modes independently.&#x20;

[PayPal TEST Mode Configuration](https://docs.paymentpageplugin.com/payment-gateways/paypal/paypal-setup#paypal-test-mode-configuration)

[PayPal LIVE Mode Configuration](https://docs.paymentpageplugin.com/payment-gateways/paypal/paypal-setup#paypal-live-mode-configuration)

## Paypal TEST Mode Configuration

PayPal has a Developer Portal available at <https://developer.paypal.com.&#x20>;

There are three steps in the TEST Mode (Sandbox) setup required in order to fully test payments in TEST mode.&#x20;

1. Create a Sandbox Business Account - This will act as your "Business Account" to **receive** TEST payments and is necessary for creating the Sandbox Application (step #2).&#x20;
2. Create a Sandbox Application - This will provide the credentials to be entered into the Payment Page plugin settings to **receive** TEST payments.&#x20;
3. Create a Sandbox Personal Account - This will act as your "Personal Account" to **make** TEST payments. When making a test payment, you'll need to login with these credentials.&#x20;

### Create a Sandbox Business Account

To create a Sandbox Business Account, register for the Developer portal and then go to the [Sandbox > Accounts](https://developer.paypal.com/developer/accounts) section.&#x20;

Click "Create Account:"

![Creating a Sandbox PayPal Account](/files/6AnLraY9FAi5S62azTM4)

In the popup section, under Account Type, Select "Business (Merchant Account)" and your corresponding region:&#x20;

![Creating a Sandbox Business PayPal account](/files/vvTsgQS68ZHq326rDNeA)

Click "Create" and then you'll see the account appear in the list.

Under the Manage Accounts column, click the 3 dot menu, and select "View/Edit Account:"

Copy the email address into the Payment Page Plugin settings in TEST mode for PayPal:

![PayPal TEST Connection Settings in the Payment Page plugin settings](/files/cohIgfI1zNWqLPdLTKWS)

To obtain the Client ID and Secret for your application, proceed to create a Sandbox Application.&#x20;

### Creating a Sandbox Application

To create a Sandbox application,  go to the [PayPal My Apps & Credentials](https://developer.paypal.com/developer/applications) section.&#x20;

Under the REST API apps section, click "Create App:"&#x20;

![Creating a PayPal Sandbox Application](/files/NFlpIjyVhxRPJgmyKThb)

Give your App a relevant name, such as your website domain name, and select the Sandbox Business Account from the dropdown menu. Then, click "Create App."

![Creating a PayPal Sandbox Application](/files/gseFbfeNbzjTKSoNEbih)

You will then be presented with the credentials page. Copy the Client ID and Secret into the Payment Page plugin settings and click "Save Settings:"

![Entering PayPal Client ID and Secret into Payment Page plugin Settings](/files/jSC2qcbvrnzsUJRH3CHn)

That's it! You've configured the connection to your PayPal account.

{% hint style="info" %}
For other functionality to work properly, such as confirmation emails, please ensure you [configure PayPal webhooks](https://docs.paymentpageplugin.com/payment-gateways/paypal/paypal-webhook-configuration).
{% endhint %}

{% content-ref url="/pages/Bod2jfj6tc1jwfGhR9ks" %}
[PayPal Webhook Configuration](/payment-gateways/paypal/paypal-webhook-configuration)
{% endcontent-ref %}

Once you've configured the connection to your PayPal account in TEST mode, you may want to make test payments. To make test payments, you need to create a PayPal Personal Sandbox Account.

### Creating a Sandbox Personal Account

Go back to PayPal [Sandbox > Accounts](https://developer.paypal.com/developer/accounts) section, and click "Create Account:"&#x20;

Under "Account Type" leave the selection for "Personal (Buyer Account)" and select your corresponding country:

![Create Personal Sandbox PayPal Account](/files/WZrfL9OW92DrQtX8KPiO)

Under the Manage Accounts column, click the 3 dots menu and select "View/Edit Account."

Change the password so you know what it is, as it is randomly designated by PayPal at first.&#x20;

When making TEST payments with PayPal, use these credentials for the Buyer account when prompted to login.&#x20;

## PayPal Live Mode Configuration

{% hint style="info" %}
The setup process is exactly the same for both TEST and LIVE modes - just ensure you've clicked either "Sandbox" or "Live" at the top of the [PayPal My Apps & Credentials](https://developer.paypal.com/developer/applications) section.&#x20;
{% endhint %}

For live mode configuration, you only need to create a new Live Application. You don't need a Sandbox Business Account to receive payments in LIVE mode.&#x20;

The Live Application credentials should be entered into the Payment Page plugin settings along with your primary PayPal email address.

{% hint style="success" %}
If you have any questions or get stuck anywhere, please email us at <support@gauchoplugins.com>.&#x20;
{% endhint %}


# PayPal Webhook Configuration

Configuring PayPal webhooks takes a few simple steps in order to validate payment completion.

Once you've configured your PayPal connection, you may want to set up webhooks in order for [Form Actions on Submit](https://docs.paymentpageplugin.com/features/form-actions-on-submit) to work properly.&#x20;

To create a Webhook, go to the [PayPal My Apps & Credentials](https://developer.paypal.com/developer/applications) section.

{% hint style="info" %}
Creating a webhook is the same process in TEST and LIVE modes - just ensure you've clicked "Sandbox" or "Live" using the switcher at the top of the [My Apps & Credentials](https://developer.paypal.com/developer/applications) section.&#x20;
{% endhint %}

Click the application you created in [PayPal Setup](https://docs.paymentpageplugin.com/payment-gateways/paypal/paypal-setup), and scroll to the bottom of the application details to edit the section called "Sandbox Webhooks."

![Sandbox Webhooks in PayPal Developer Portal](/files/bwU1B7V4GJ5oP8WAqZ7I)

Click "Add Webhook."

Paste in the Webhook URL from the Payment Page plugin settings, which is dynamically generated for your site:

![Webhook URL Field for PayPal Sandbox Webhooks](/files/aulQ5HVD95hx2ZNbWo29)

Then, select the option for "Payment capture completed."

![Checkbox for "Payment capture completed" Webhook](/files/pUxa3VQcm6WSL7WJzJH6)

Click "Save" at the bottom.&#x20;

Copy the newly created "Webhook ID" into the Payment Page plugin settings and click "Save Settings."

![Webhook ID Field in the Payment Page Plugin Settings](/files/Ls0CD0GGS6NRCW5C5gns)

That's it! Your new webhook is properly configured in TEST or LIVE modes.&#x20;

{% hint style="success" %}
Please reach out to <support@gauchoplugins.com> with any questions.&#x20;
{% endhint %}


# Credit + Debit Cards

Credit and debit card payments are supported as part of the Standard PayPal checkout flow. Customers do not need to sign in with their PayPal accounts.&#x20;


# Pay Later


# Venmo


# Bancontact


# BLIK


# eps


# giropay


# iDEAL


# Mercado Pago


# MyBank


# Przelewy24 (P24)


# SOFORT


# Prefill Form Fields (query strings)

This section covers how to prefill form fields on your payment page using query string parameters.

You can easily prefill form fields on the payment form with the query strings and parameters below.&#x20;

{% hint style="danger" %}
For the first parameter of your query string, ensure you enter a question mark "?". Then, use the ampersand symbol "&" for all following strings. See examples below.&#x20;
{% endhint %}

### Examples

You can read all about how query strings and their parameters work in the details below, but in the meantime, here are some examples you can copy/paste.

Let's say you want to accept a credit card payment from Stripe for $99/month and you already had that plan set up on your payment form. Here's the query string combination you would send to your customer or link on your site:&#x20;

```
https://your-domain.com/?gateway=stripe&method=cards&currency=usd&frequency=m_1&amount=99.00
```

Let's say you want to accept a custom invoice amount for €59.99, you've created a custom field labeled "Invoice ID" on your form, and you want to select SEPA as the payment method to be used automatically. You would give this link to your customer:&#x20;

```
https://your-domain.com/?gateway=stripe&method=sepa&currency=eur&frequency=one-time&
```

### List of Query Strings and Parameters&#x20;

Here are all the query strings and their possible parameters, along with some examples and important notes.&#x20;

| Query String    | Parameters                                                                                                                                                                                                                                            | Notes                                                                                                                            |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| ?email\_address | Any email address                                                                                                                                                                                                                                     |                                                                                                                                  |
| ?first\_name    | Any string                                                                                                                                                                                                                                            |                                                                                                                                  |
| ?last\_name     | Any string                                                                                                                                                                                                                                            |                                                                                                                                  |
| ?gateway        | stripe, paypal                                                                                                                                                                                                                                        | \* The ?gateway parameter must be used in conjunction with the ?method parameter.                                                |
| ?method         | <p><strong>Stripe methods:</strong> </p><p>ccard </p><p>ach\_direct\_debit (Plaid) </p><p>sepa </p><p>apple\_pay</p><p>google\_pay</p><p>microsoft\_pay </p><p>alipay </p><p>wechat<br><br><strong>PayPal methods:</strong><br>standard\_checkout</p> | \* The ?gateway parameter must be used in conjunction with the ?method parameter.                                                |
| ?currency       | <p>Any 3-digit currency code. <br>E.g. - usd, eur</p>                                                                                                                                                                                                 |                                                                                                                                  |
| ?frequency      | <p>d\_1 <- Daily <br>w\_1 <- Weekly <br>m\_1 <- Monthly <br>m\_3 <- Quarterly<br>m\_6 <- Every 6 months <br>y\_1 <- Annually <br>y\_3 <- Every 3 Years <br>one-time <- One Time</p>                                                                   |                                                                                                                                  |
| ?amount         | <p>Any currency value with or without a decimal. <br>E.g. - 99.00</p>                                                                                                                                                                                 | Match the currency, amount, and frequency to preselect a specific plan. Otherwise, the ?amount prefills the Custom Amount field. |

{% hint style="warning" %}
If any parameters are missing, the first possible matched plan will be selected. Match all the possible parameters to the plan you want to pre-select.&#x20;
{% endhint %}

### Special Parameters&#x20;

#### Match Field Label

If you've added a Custom Field on your payment form, you can prefill the field.&#x20;

All you need to do is match the parameter to your field label by simplifying the label without any capitalization and using underscores instead of spaces.&#x20;

For example, if your Custom Field Label is `Invoice ID`, then your query string should look like this:&#x20;

```
your-domain.com/?invoice_id=xyz123
```

Replace `xyz123` with whatever Invoice ID you actually want to record for the payment. This data will then get passed to the Stripe Metadata section when viewing the Payment details:

![Custom Query String Captured in Stripe Metadata](/files/mjgcvh8DVNGk4aIKRlCg)

#### Unmatched Strings

Any query strings that are unmatched to your form fields can be passed as an HTTP Request. Please read the corresponding documentation about setting up HTTP Requests on the form.&#x20;

{% content-ref url="/pages/ZlhjaoKYqcyOIRS2yU6L" %}
[HTTP Requests](/features/form-actions-on-submit/http-requests)
{% endcontent-ref %}


# Form Actions on Submit

There are currently 4 Form Actions on payment confirmation available, including:

1. Confirmation Email
2. Redirect
3. Dynamic Message
4. HTTP Request

These can be enabled in the Settings under Actions After Submit:

![Enabling Actions After Submit in the Elementor Payment Form Widget](/files/N88UTtEYp087Oh0a7XcX)

For details about each Action, please see these docs:

{% content-ref url="/pages/4dKwXVwNoLOwiEcQD61C" %}
[Confirmation Email](/features/form-actions-on-submit/confirmation-email)
{% endcontent-ref %}

{% content-ref url="/pages/loVAg6N3XCjdSUtb14iB" %}
[Redirect](/features/form-actions-on-submit/redirect)
{% endcontent-ref %}

{% content-ref url="/pages/4PdX1QLuAYG8KVWHgduV" %}
[Dynamic Message](/features/form-actions-on-submit/dynamic-message)
{% endcontent-ref %}

{% content-ref url="/pages/ZlhjaoKYqcyOIRS2yU6L" %}
[HTTP Requests](/features/form-actions-on-submit/http-requests)
{% endcontent-ref %}


# Confirmation Email

Send confirmation emails when payments are completed.

Payment confirmation emails can be sent to the Admin and the Payer. When setting up a payment form, go to Actions on Submit, and select "Email:"&#x20;

![Enabling Email Notifications in Actions After Submit](/files/fmiXEgVPUitzZ8bENST9)

After enabling emails, you'll see a new section where you can configure the recipient address for the Admin, the Subject line for the Admin and the Payer emails, and the email address and name to appear as the sender of the emails.&#x20;

![Email Section in Payment Page Elementor Widget Settings](/files/KESbJHI5o2I1HEKesdn2)

The email confirmation contents will look something like this, with the same information provided to Admin and Payer:

![Email Confirmation to Admin and Payer](/files/fX6OCIMwBS3GMLiJJNxp)

{% hint style="warning" %}
Confirmation emails require the use of Webhooks to send properly on payment success. Please review our documentation for [Stripe Webhook Configuration](https://docs.paymentpageplugin.com/payment-gateways/stripe/stripe-webhook-configuration) and [PayPal Webhook Configuration](https://docs.paymentpageplugin.com/payment-gateways/paypal/paypal-webhook-configuration) for questions.&#x20;
{% endhint %}

{% hint style="info" %}
The confirmation email contents currently cannot be customized, except for the Subject line to each the Admin and the Payer. Customization options will be available soon.
{% endhint %}

{% content-ref url="/pages/l8Wu5jPuxLemzEuVbxmC" %}
[Stripe Webhook Configuration](/payment-gateways/stripe/stripe-webhook-configuration)
{% endcontent-ref %}

{% content-ref url="/pages/Bod2jfj6tc1jwfGhR9ks" %}
[PayPal Webhook Configuration](/payment-gateways/paypal/paypal-webhook-configuration)
{% endcontent-ref %}


# Redirect

Redirect users to another page when payments are completed.

Simply enter the Redirect URL of the page where you want to send customers after completing payment:

![Enter Redirect URL](/files/QqXVy2fCw5xdBE1oLx3h)


# Dynamic Message

Display a Dynamic Confirmation message when customers finish making payment.

When your customers finish making a payment, you may want to display the payment confirmation details on the page. We have set up a simple action that replaces the form with the confirmation details.&#x20;

Enter your Payment Success Message and the Payment Details Title, optionally displaying your payment confirmation details as well:

![Creating a Dynamic Payment Confirmation Message](/files/Bj6JjpABQH9sHgBtTf9P)


# HTTP Requests

Send data to an external URL when the form fields are submitted.

{% hint style="danger" %}
Ensure Webhooks are configured correctly in order for HTTP Requests to process properly.
{% endhint %}

Send your payment confirmation details to any external URL as an HTTP Request upon payment confirmation. This is perfect for SaaS platforms or mobile apps that want to utilize an external payment platform while retaining all the relevant details of their customer and the payment.&#x20;

### Testing HTTP Requests via RequestBin

Go to [requestbin.com](https://requestbin.com) and create a Bin by registering for a free account or creating a public bin.&#x20;

Copy your RequestBin endpoint URL into the Payment Page HTTP Request Settings:

![RequestBin Endpoint URL](/files/kBbuokIlD1Tgu56kFhPk)

![HTTP Request Settings in Payment Page with RequestBin URL](/files/EFLSNUSW1j0eIF1tekKb)

Create a TEST or LIVE payment, then check your RequestBin data. It should look something like this:&#x20;

![HTTP Request Data in RequestBin](/files/SvqVn9eehQVmxTwwb10R)

### Testing HTTP Requests via Zapier

The HTTP Request can be tested with the Zapier Webhooks mechanism for free by following the steps below.&#x20;

Create a new Zap in your [Zapier Dashboard](https://zapier.com/app/zaps).&#x20;

For your Trigger, select **Webhooks by Zapier**. While it's a Premium Zapier feature, it can be tested for free:

![Creating a Zapier Zap with Webhooks by Zapier](/files/FizZWaHSPxr9qGjwhnlk)

In the "Choose app & event" section, select **Catch Hook**:

![Webhooks by Zapier Catch Hook Trigger](/files/0JIA0AT8r5wW7DR3g6RV)

Select Continue, and skip the **Set up trigger** section.&#x20;

Continue to **Test Trigger**, and copy the Webhook URL provided by Zapier:

![Testing a Webhook Trigger in Zapier - Copy Webhook URL](/files/BoZcJ0hxJXoUks63XJW0)

Go back to edit your payment form, and under the section **Actions After Submit**, ensure you have HTTP Request selected:

![Payment Page Actions After Submit Settings](/files/sBLmxmv0GBEPufvNNNoS)

In the HTTP Request settings, paste in your Zapier Webhook URL:

![HTTP Request Settings in Payment Page with Zapier Webhook URL](/files/clMC9ZB26BEFfSyl8bgZ)

Run a TEST or LIVE payment on the payment form.

Then, click **Test Trigger** in the Zapier Dashboard:

![Test Trigger Button in Zapier Dashboard](/files/BnA0CEUIrsuMSroRiyBf)

The resulting data will look something like this:

![Zapier Webhook Data from Payment Page Plugin](/files/S2pt3oeESR2Af4Ffh9vC)

Then, you can automate anything you want with Zapier apps or build your own custom functionality based on the data provided.&#x20;

{% hint style="info" %}
Custom form fields will be passed individually. Query strings that aren't matched to any custom form fields will also be included in the HTTP Request details.
{% endhint %}

{% content-ref url="/pages/4UwLINo93uAGgN50umwX" %}
[Prefill Form Fields (query strings)](/features/prefill-form-fields-query-strings)
{% endcontent-ref %}


# How can I sign up for BETA versions?

1. Send us a request to [support@gauchoplugins.com](mailto:support@gauchoplugins.com,) or click "New Support Ticket" above.&#x20;
2. After your BETA access request is approved, login to your site, and go to Payment Page > Account.&#x20;
3. Click the checkbox to Join the BETA program.

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/66011174422/original/RmZIWcmw4-TBMMiW4Q268srvmW8woa_UVw.png?1623087048)

When a BETA version is available, you'll see this option to upgrade:

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/66011174556/original/d23tOqAgzxkTI7JK_8CYZNCdIITkwSVD7g.png?1623087134)

You'll also see this notice to upgrade on the Plugins page:

![](https://s3.amazonaws.com/cdn.freshdesk.com/data/helpdesk/attachments/production/66011174513/original/xoHQyDSDb79UWkwlNhQzAw242nv04RXYeQ.png?1623087097)


# What's the total cost of using the plugin?

The free version has a small 2% transaction fee associated with Stripe payments. There are no transaction fees on any other gateways. The 2% fee allows us to continue supporting the development of a great free plugin for the community.

The paid version of Payment Page removes the 2% transaction fee. See our [pricing plans here](https://payment.page/pricing/).&#x20;


# How do I add Gaucho Plugins to my Stripe team?

Adding Gaucho Plugins to your Stripe team allows us to help troubleshoot and configure the Split Pay Plugin.

If you need advanced troubleshooting support, you can grant access to your Stripe account so the Gaucho Plugins team can assess the issue.

1. Login to your Stripe account and go to Settings > [Team](https://dashboard.stripe.com/settings/team).
2. Add our support email address as a team member with Developer level access:

```
support@gauchoplugins.com
```


# REST API

The Payment Page plugin employs several classes to manage its REST API functionality. Each class is responsible for specific functionalities related to the plugin's operation.

1\. **RestAPI\Administration**

* **Purpose**: Manages administrative functionalities of the Payment Page plugin, including settings and configurations.
* **Expected Methods**:
  * **`register_routes()`**:
    * **Functionality**: Registers API endpoints related to the admin settings.
    * **Example Endpoints**:
      * **`GET /wp-json/payment-page/v1/settings`**
        * **Description**: Retrieves the current settings of the Payment Page.
        * **Response**:

          ```json
          {
              "currency": "USD",
              "payment_gateway": "stripe",
              "api_key": "sk_test_...",
              "debug_mode": false
          }
          ```
      * **`POST /wp-json/payment-page/v1/settings`**
        * **Description**: Updates the plugin settings.
        * **Request Body**:

          ```json
          {
              "currency": "EUR",
              "payment_gateway": "paypal",
              "api_key": "sk_test_...",
              "debug_mode": true
          }
          ```
        * **Response**:

          ```json
          {
              "success": true,
              "message": "Settings updated successfully."
          }
          ```
      * **`DELETE /wp-json/payment-page/v1/settings`**
        * **Description**: Resets settings to default.
        * **Response**:

          ```json
          {
              "success": true,
              "message": "Settings reset to default."
          }
          ```

#### 2. **RestAPI\Payment**

* **Purpose**: Handles payment-related functionalities, including processing transactions and managing payment history.
* **Expected Methods**:
  * **`register_routes()`**:
    * **Functionality**: Registers endpoints for managing payment processes.
    * **Example Endpoints**:
      * **`POST /wp-json/payment-page/v1/payment/process`**
        * **Description**: Processes a new payment.
        * **Request Body**:

          ```json
          {
              "amount": 100,
              "currency": "USD",
              "payment_method": "credit_card",
              "description": "Order #12345"
          }
          ```
        * **Response**:

          ```json
          {
              "transaction_id": "abc123",
              "status": "success",
              "message": "Payment processed successfully."
          }
          ```
      * **`GET /wp-json/payment-page/v1/payment/status`**
        * **Description**: Retrieves the status of a specific payment using its transaction ID.
        * **Request Query**: `?transaction_id=abc123`
        * **Response**:

          ```json
          {
              "transaction_id": "abc123",
              "status": "completed",
              "amount": 100,
              "currency": "USD",
              "date": "2024-10-01T12:00:00Z"
          }
          ```
      * **`GET /wp-json/payment-page/v1/payment/history`**
        * **Description**: Retrieves a list of past payments.
        * **Response**:

          ```json
          [
              {
                  "transaction_id": "abc123",
                  "amount": 100,
                  "currency": "USD",
                  "status": "completed",
                  "date": "2024-10-01T12:00:00Z"
              },
              {
                  "transaction_id": "def456",
                  "amount": 50,
                  "currency": "USD",
                  "status": "pending",
                  "date": "2024-10-02T15:30:00Z"
              }
          ]
          ```

#### 3. **RestAPI\PaymentGateway**

* **Purpose**: Interfaces with various payment gateways, allowing users to configure and manage gateway settings.
* **Expected Methods**:
  * **`register_routes()`**:
    * **Functionality**: Registers API endpoints for interacting with different payment gateways.
    * **Example Endpoints**:
      * **`GET /wp-json/payment-page/v1/gateway/list`**
        * **Description**: Lists all available payment gateways.
        * **Response**:

          ```json
          [
              {
                  "gateway": "paypal",
                  "enabled": true
              },
              {
                  "gateway": "stripe",
                  "enabled": true
              },
              {
                  "gateway": "authorize.net",
                  "enabled": false
              }
          ]
          ```
      * **`POST /wp-json/payment-page/v1/gateway/configure`**
        * **Description**: Configures a selected payment gateway.
        * **Request Body**:

          ```json
          {
              "gateway": "stripe",
              "api_key": "sk_test_...",
              "webhook_url": "https://yourwebsite.com/webhook"
          }
          ```
        * **Response**:

          ```json
          {
              "success": true,
              "message": "Stripe gateway configured successfully."
          }
          ```
      * **`DELETE /wp-json/payment-page/v1/gateway/:gateway`**
        * **Description**: Deletes a configured payment gateway.
        * **Response**:

          ```json
          {
              "success": true,
              "message": "Payment gateway removed."
          }
          ```

#### 4. **RestAPI\Plugin**

* **Purpose**: Manages plugin-level functionalities, including activation, deactivation, and updates.
* **Expected Methods**:
  * **`register_routes()`**:
    * **Functionality**: Registers endpoints that provide information about the plugin.
    * **Example Endpoints**:
      * **`GET /wp-json/payment-page/v1/plugin/info`**
        * **Description**: Retrieves information about the plugin.
        * **Response**:

          ```json
          {
              "name": "Payment Page",
              "version": "1.3.9",
              "author": "Gaucho Plugins",
              "license": "GPLv3"
          }
          ```
      * **`POST /wp-json/payment-page/v1/plugin/update`**
        * **Description**: Handles updates for the plugin.
        * **Request Body**:

          ```json
          {
              "version": "1.4.0"
          }
          ```
        * **Response**:

          ```json
          {
              "success": true,
              "message": "Plugin updated to version 1.4.0."
          }
          ```
      * **`GET /wp-json/payment-page/v1/plugin/status`**
        * **Description**: Checks the status of the plugin.
        * **Response**:

          ```json
          {
              "active": true,
              "version": "1.3.9"
          }
          ```

#### 5. **RestAPI\Stripe**

* **Purpose**: Specifically manages Stripe integration for processing payments.
* **Expected Methods**:
  * **`register_routes()`**:
    * **Functionality**: Registers endpoints for handling Stripe payments and configurations.
    * **Example Endpoints**:
      * **`POST /wp-json/payment-page/v1/stripe/payment`**
        * **Description**: Initiates a payment through Stripe.
        * **Request Body**:

          ```json
          {
              "amount": 100,
              "currency": "USD",
              "source": "tok_visa",
              "description": "Test payment"
          }
          ```
        * **Response**:

          ```json
          {
              "transaction_id": "xyz789",
              "status": "success",
              "message": "Payment processed through Stripe."
          }
          ```
      * **`GET /wp-json/payment-page/v1/stripe/webhook`**
        * **Description**: Handles Stripe webhooks for payment confirmations.
        * **Request Body**: Automatically handled by Stripe.
        * **Response**:

          ```json
          {
              "success": true,
              "message": "Webhook received and processed."
          }
          ```
      * **`GET /wp-json/payment-page/v1/stripe/config`**
        * **Description**: Retrieves the current Stripe configuration.
        * **Response**:

          ```json
          {
              "api_key": "sk_test_...",
              "webhook_url": "https://yourwebsite.com/webhook"
          }
          ```

#### 6. **RestAPI\Tagging**

* **Purpose**: Manages tagging and categorization of payments or payment forms.
* **Expected Methods**:
  * \*\*\`register\_routes

()\`\*\*: - **Functionality**: Registers endpoints for managing tags.

````
- **Example Endpoints**:
  - **`GET /wp-json/payment-page/v1/tags`**
    - **Description**: Lists all available tags.
    - **Response**:
      ```json
      [
          {
              "tag_id": 1,
              "tag": "featured"
          },
          {
              "tag_id": 2,
              "tag": "new"
          }
      ]
      ```
  - **`POST /wp-json/payment-page/v1/tags`**
    - **Description**: Creates a new tag for categorization.
    - **Request Body**:
      ```json
      {
          "tag": "sale"
      }
      ```
    - **Response**:
      ```json
      {
          "success": true,
          "message": "Tag created successfully."
      }
      ```
  - **`DELETE /wp-json/payment-page/v1/tags/:tag_id`**
    - **Description**: Deletes a specified tag.
    - **Response**:
      ```json
      {
          "success": true,
          "message": "Tag deleted successfully."
      }
      ```
````

#### 7. **RestAPI\Webhook**

* **Purpose**: Handles incoming webhooks from payment processors to keep track of transaction statuses.
* **Expected Methods**:
  * **`register_routes()`**:
    * **Functionality**: Registers webhook endpoints for processing notifications from payment gateways.
    * **Example Endpoints**:
      * **`POST /wp-json/payment-page/v1/webhook/receive`**
        * **Description**: Receives and processes webhook notifications.
        * **Request Body**:

          ```json
          {
              "event": "payment_intent.succeeded",
              "data": {
                  "transaction_id": "xyz789",
                  "amount": 100,
                  "currency": "USD"
              }
          }
          ```
        * **Response**:

          ```json
          {
              "success": true,
              "message": "Webhook processed successfully."
          }
          ```
      * **`GET /wp-json/payment-page/v1/webhook/status`**
        * **Description**: Checks the current webhook status configuration.
        * **Response**:

          ```json
          {
              "webhook_url": "https://yourwebsite.com/webhook",
              "status": "active"
          }
          ```

#### How to Utilize `register_rest_route()`

Each of the `register_routes()` methods in the classes above typically employs the `register_rest_route()` function to define the endpoints. This function is vital for creating a custom REST API in WordPress.

**Basic Syntax:**

```php
register_rest_route('payment-page/v1', '/endpoint-name', [
    'methods' => 'GET', // Can be 'GET', 'POST', 'PUT', 'DELETE', etc.
    'callback' => 'callback_function_name', // Function that handles the request.
    'permission_callback' => 'permission_check_function' // Function to check permissions.
]);
```

* **Parameters**:
  * **Namespace**: The first parameter (e.g., `'payment-page/v1'`) specifies the namespace for the REST API, which helps in organizing routes.
  * **Route**: The second parameter specifies the endpoint (e.g., `'/settings'`).
  * **Arguments**: The third parameter is an associative array that defines:
    * **`methods`**: Allowed HTTP methods (GET, POST, etc.).
    * **`callback`**: The function that processes the request.
    * **`permission_callback`**: A function to validate whether the user has permission to access the endpoint.

### Constants

The plugin defines several constants that are utilized throughout the codebase, allowing developers to reference them easily. These constants are defined in `definitions.php`:

* **`PAYMENT_PAGE_NAME`**: The name of the payment page plugin.
* **`PAYMENT_PAGE_ALIAS`**: A short alias for the payment page, used in various settings.
* **`PAYMENT_PAGE_PREFIX`**: A prefix used in the plugin's identifiers, useful for namespacing custom functionality.
* **`PAYMENT_PAGE_REST_API_PREFIX`**: The prefix used for REST API routes.
* **`PAYMENT_PAGE_ADMIN_CAP`**: The capability required for accessing admin settings.
* **`PAYMENT_PAGE_VERSION`**: The current version of the plugin.
* **`PAYMENT_PAGE_TABLE_STRIPE_CUSTOMERS`**: The database table name for storing Stripe customer records.

#### Example Usage of Constants

```php
if ( current_user_can(PAYMENT_PAGE_ADMIN_CAP) ) {
    // Code to show settings page
}
```

***

This detailed documentation provides an extensive overview and actionable examples for developers working with the Payment Page plugin. If you have any additional requests or need further modifications, feel free to [contact support](https://paymentpageplugin.com/support/).


# Hooks & Filters

Below is a detailed description of the hooks and filters available in the Payment Page plugin, tailored for advanced developers. Each hook and filter includes its name, purpose, and usage examples.

### Action Hooks

1. **`payment_page_after_payment`**
   * **Purpose**: Triggered after a payment is successfully processed.
   * **Usage**: Allows developers to execute additional actions like logging the transaction, notifying users, or updating external systems.
   * **Example**:

     ```php
     add_action('payment_page_after_payment', 'log_payment_details', 10, 2);

     function log_payment_details($transaction_id, $amount) {
         // Log the transaction details
         error_log("Transaction processed. ID: $transaction_id, Amount: $amount");
     }
     ```
2. **`payment_page_settings_saved`**
   * **Purpose**: Called after the plugin settings are saved.
   * **Usage**: Use this hook to perform actions like clearing caches, sending notifications, or validating settings.
   * **Example**:

     ```php
     add_action('payment_page_settings_saved', 'clear_cache_after_settings_change');

     function clear_cache_after_settings_change() {
         // Clear cached data after settings are updated
         my_cache_clear_function();
     }
     ```
3. **`payment_page_gateway_initialized`**
   * **Purpose**: Invoked when a payment gateway is initialized.
   * **Usage**: Perform setup actions, such as validating configurations or preparing necessary resources.
   * **Example**:

     ```php
     add_action('payment_page_gateway_initialized', 'check_gateway_configuration');

     function check_gateway_configuration($gateway) {
         // Check if gateway configuration is correct
         if (!isset($gateway['api_key'])) {
             // Handle missing API key
             error_log("API key is missing for the gateway.");
         }
     }
     ```
4. **`payment_page_before_payment`**
   * **Purpose**: Triggered before a payment is processed.
   * **Usage**: Useful for running validation checks or modifying the payment request before it's sent to the gateway.
   * **Example**:

     ```php
     add_action('payment_page_before_payment', 'validate_payment_request', 10, 1);

     function validate_payment_request($payment_data) {
         // Perform validation on payment data
         if ($payment_data['amount'] <= 0) {
             wp_die('Invalid payment amount.');
         }
     }
     ```
5. **`payment_page_gateway_disabling`**
   * **Purpose**: Executed when a payment gateway is being disabled.
   * **Usage**: Perform cleanup actions or notify users about the change.
   * **Example**:

     ```php
     add_action('payment_page_gateway_disabling', 'notify_gateway_disabling', 10, 1);

     function notify_gateway_disabling($gateway_name) {
         // Notify users when a gateway is disabled
         wp_mail('admin@example.com', 'Gateway Disabled', "$gateway_name has been disabled.");
     }
     ```

### Filter Hooks

1. **`payment_page_gateway_options`**
   * **Purpose**: Allows modification of the list of available payment gateways.
   * **Usage**: Customize which gateways are available to the user, adding or removing options as necessary.
   * **Example**:

     ```php
     add_filter('payment_page_gateway_options', 'add_custom_gateway', 10, 1);

     function add_custom_gateway($gateways) {
         // Add a custom payment gateway
         $gateways[] = 'custom_gateway';
         return $gateways;
     }
     ```
2. **`payment_page_settings`**
   * **Purpose**: Filters the settings before they are saved.
   * **Usage**: Validate or modify settings to ensure they meet specific criteria.
   * **Example**:

     ```php
     add_filter('payment_page_settings', 'sanitize_settings_data', 10, 1);

     function sanitize_settings_data($settings) {
         // Sanitize the API key setting
         $settings['api_key'] = sanitize_text_field($settings['api_key']);
         return $settings;
     }
     ```
3. **`payment_page_transaction_response`**
   * **Purpose**: Filters the response from payment gateways before it is processed by the plugin.
   * **Usage**: Modify response data for logging, notifications, or error handling.
   * **Example**:

     ```php
     add_filter('payment_page_transaction_response', 'process_transaction_response', 10, 1);

     function process_transaction_response($response) {
         // Modify the response to include additional data
         $response['processed_time'] = current_time('mysql');
         return $response;
     }
     ```
4. **`payment_page_form_fields`**
   * **Purpose**: Allows modification of form fields rendered on the payment page.
   * **Usage**: Customize the payment form by adding or removing fields based on user needs.
   * **Example**:

     ```php
     add_filter('payment_page_form_fields', 'add_custom_form_fields', 10, 1);

     function add_custom_form_fields($fields) {
         // Add a custom input field to the payment form
         $fields['custom_field'] = '<input type="text" name="custom_field" placeholder="Enter something...">';
         return $fields;
     }
     ```
5. **`payment_page_payment_methods`**
   * **Purpose**: Filters the list of payment methods available to users during checkout.
   * **Usage**: Add, remove, or modify payment methods based on specific criteria or conditions.
   * **Example**:

     ```php
     add_filter('payment_page_payment_methods', 'modify_payment_methods', 10, 1);

     function modify_payment_methods($methods) {
         // Remove 'check' as a payment method
         if (($key = array_search('check', $methods)) !== false) {
             unset($methods[$key]);
         }
         return $methods;
     }
     ```

***

This section provides advanced developers with a detailed understanding of the available hooks and filters in the **Payment Page** plugin, including practical examples of how they can be implemented. If you need further elaboration on any specific hook or filter, or if you have additional questions, feel free to [contact support](https://paymentpageplugin.com/support/).&#x20;


# PHP Versions Supported (7.1+)

Payment Page requires PHP versions 7.1+


# Known Plugin Conflicts

### W3 Total Cache

When database upgrades are required by Payment Page, there is a conflict with the W3 Total Cache plugin because W3TC caches the WordPress REST API, which is required for database upgrades.&#x20;

To solve this, clear the W3TC cache, temporarily disable W3TC during the migration upgrade process, or altogether use a different caching plugin.&#x20;

### WordPress REST API

{% hint style="danger" %}
Relevant error: "Sorry, you do not have permission to make API requests."&#x20;
{% endhint %}

Ensure that there are no performance or security plugins disabling the WordPress REST API. You should also verify with your hosting company they are not disabling the REST API, as it is necessary for payments.&#x20;

We've had reports from some users that plugins like Perfmatters, which may disable the REST API, can block payments from completing (particularly on mobile). In the perfmatters plugin specifically, leave the settings like this:

<figure><img src="/files/m8LtIyRsNSoCXkYmZKGV" alt=""><figcaption><p>Perfmatters Disable REST API Setting</p></figcaption></figure>

### Label Misplacement

Some themes override the form field labels. If that occurs in your case, please implement the below Custom CSS. You may need to adjust the `50px` to a different value  depending on your theme.&#x20;

```
/* Fix for Payment Page labels */
[data-payment-page-component-payment-form-section="field"] > label {
    position: absolute !important;
    top: 0 !important;
    line-height: 50px !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 50px !important;
}

/* Fix the transform for active states */
[data-payment-page-component-payment-form-section="field"][data-payment-page-interaction-state="focus"] > label,
[data-payment-page-component-payment-form-section="field"][data-payment-page-interaction-state="error"] > label,
[data-payment-page-component-payment-form-section="field"][data-payment-page-interaction-state="not-empty"] > label {
    transform: scale(0.85) translateY(-15px) !important;
```


# Changelog

This is the full Changelog of development updates for the Payment Page WordPress plugin.

### Version 1.4.8 - Feb 19, 2026

* Bug fixes.
* Payment form layout fixes.

### Version 1.4.7 - Feb 18, 2026

* Security upgrades.

### Version 1.4.6 - Dec 16, 2025

* Freemius SDK updated.

### Version 1.4.5 - Aug 21, 2025

* Fix translations for payment frequency filter.
* Freemius SDK updated.

### Version 1.4.4 - April 5, 2025

* Domain API update.

### Version 1.4.3 - Jan 27, 2025

* Freemius SDK update.

### Version 1.4.2 - Dec 30, 2024

* Implemented Elementor Colors API.
* Freemius SDK update.

### Version 1.4.1 - Dec 11, 2024

* Fix to draft mode form.
* General UI improvements.
* Freemius SDK update.

### Version 1.4.0 - Oct 23, 2024

* Freemius SDK update.

### Version 1.3.9 - Oct 8, 2024

* Translation fixes.

### Version 1.3.8 - Sept 25, 2024

* Translation fixes.

### Version 1.3.7 - Sept 20, 2024

* Translation fixes.
* Freemius SDK update.

### Version 1.3.6 - Sept 10, 2024

* Fix to Stripe return URL.
* Minor UI/template changes.

### Version 1.3.5 - Sept 2, 2024

* Update to template importing.
* Other general UI changes.&#x20;

### Version 1.3.4 - August 27, 2024

* Subscriptions now included in free version!
* Stripe library update.

### Version 1.3.3 - August 26, 2024

* Fix to Plaid/ACH activation.

### Version 1.3.2 - August 13, 2024

* New custom payment form builder!

### Version 1.3.1 - April 10, 2024

* Code formatting improvements.
* Update Freemius SDK.

### Version 1.3 - Oct 26, 2023

* Updates to formatting of payment confirmation emails.
* Fixes to non-decimal currencies charging incorrectly.
* Update Freemius SDK.

### Version 1.2.9 - July 5, 2023

* Update Freemius SDK.

### Version 1.2.8 - September 16, 2022

* Improved the methods for storing Stripe and PayPal transaction details in the database.
* Added Paypal transaction description to be from the pricing plan name.
* Migration bugfix.
* Decreased the size of a loading animation GIF to just 22kb.

### Version 1.2.7 - August 26, 2022

* Updated Freemius SDK to v2.4.5.

### Version 1.2.6 - August 12, 2022

* Added Payment Description field to show up properly in Stripe receipts (matches pricing name).
* Ensured submit button automatically activates when all fields are automatically pre-filled.

### Version 1.2.5 - July 29, 2022

* Added polyfill function to properly handle webhooks.
* Fix for database migration issues.

### Version 1.2.4 - July 15, 2022

* Implemented confirmation emails for Admin and Payer.
* Implemented PayPal Webhooks to verify payments for Form Actions on Submit.
* Updated Freemius SDK to v2.4.4.

### Version 1.2.3 - July 1, 2022

* Updates to custom actions on payment completion, which now includes the currently logged in user in the request.

### Version 1.2.2 - June 16, 2022

* Added the option to have a different first payment amount in a subscription.
* Updates to the custom actions on payment completion.

### Version 1.2.1 - May 31, 2022

* Zip code field is now optional.
* Added support for custom actions on payment completion.

### Version 1.2.0 - May 17, 2022

* Updated Quick Setup to be optional.
* Switched order of Templates and Gateways tabs to make Templates more readily available.
* Enabled Demo mode on the payment form to display without any gateways connected.
* Made Custom Payment Amounts available in the free version.
* Made all Stripe payment methods available in the free version, except ACH via Plaid.
* Added Stripe platform fee in free version.

### Version 1.1.3 - April 15, 2022

* Fix to German translation of SEPA mandate.
* You can now prefill form fields with query string parameters, including custom fields.&#x20;
* Added Action for sending HTTP request of form data to external URL.

### Version 1.1.2 - April 1, 2022

* SEPA mandate translated to German.
* Better error handling for PayPal.

### Version 1.1.1.1 - March 18, 2022

* Fix to PayPal integration where PayPal could not be disabled in some cases.&#x20;
* Fix to Payment Method tabs not appearing in Free version with China Payments Plugin enabled.&#x20;
* Improvements to settings layout.&#x20;

### Version 1.1.1 - March 4, 2022

* Update to Features Notifications section so you can more easily stay up to date when we release new features.

### Version 1.1 - Feb 21, 2022

* Added PayPal Standard Integration! You can now accept one-time PayPal payments with the standard checkout flow that requires logging into a PayPal account.
* Added Stripe Payment Methods Google Pay, Apple Pay, and Microsoft Pay.
* The Stripe + Plaid integration is now supported for ACH transactions. Register a Plaid account and utilize Stripe to allow customers to seamlessly make ACH payments with US-based bank accounts.
* Custom form fields are now supported.
* Form fields can now be reordered.
* Desktop and mobile width settings are now available for form fields.

### Version 1.0.8 - Feb 4, 2022

* Added Stripe Payment Methods SEPA Direct Debit, WeChat Pay, and Alipay.
* Tons of styling improvements and updates to the payment form.
* Added Tabs and Payment Buttons mechanisms - now the payment form supports multiple payment options.
* Stripe account name now appears next to TEST/LIVE switcher after connecting.&#x20;
* TEST/LIVE mode button added to WP-Admin bar.
* All 10 templates have had a huge makeover!&#x20;
* SCA integration 100% implemented.&#x20;
* We now show a little 'Payment Page' label next to each page where a payment form is detected.
* Error message added if no gateway is connected.&#x20;
* Added integration with China Payments Plugin.&#x20;

### Version 1.0.7 - January 20, 2022

* Refactored Elementor payment form widget to vanilla JS/CSS.
* Stripe now fully attaches customer details for one-time and recurring payments.&#x20;
* Decimal issues for various currencies have been fully resolved.&#x20;
* Improving the validation for multiple pricing plans being selected in the Elementor Widget.&#x20;

### Version 1.0.6 - January 14, 2022

* New First Time UX and Settings area.
* Major rebuild of Stripe Connect API.
* Fixes to Stripe Connect Onboarding.
* Templates are now cached for retrieval once every hour instead of being loaded each time they are accessed.

### Version 1.0.5.1 - November 20, 2021

* Bugfix where payment form wasn't rendering properly in some cases.&#x20;

### Version 1.0.5 - November 9, 2021

* Major styling fixes to the payment form.

### Version 1.0.4 - June 04, 2021

* Bug-fixes for opt-in form.
* Fixed redirection issue.
* Fixed filters not appearing in some cases.
* Fixed WP Admin styling components (typography conflict).

### Version 1.0.3 - May 07, 2021

* Added custom payment amounts!

### Version 1.0.2 - March 20, 2021

* Fixed subscriptions issue.
* Updated and prepared for AppSumo launch!

### Version 1.0.1 - November 11, 2020

* Major bug fixes to Elementor Widget and Setup Wizard.

### Version 1.0 - October 14, 2020

* Our first release!&#x20;


