Want to collect PayPal payments on your WordPress site? Formidable Forms gives you two ways to do it, so you can start taking payments in just a few minutes. In this guide, we'll show you how to set up PayPal payments using both PayPal Commerce and PayPal Standard.
Info: There are two PayPal integrations. PayPal Commerce is the newer option and the one we recommend for all new setups. PayPal Standard is the legacy integration.
Upgrade your WordPress site with powerful, flexible forms.
PayPal Commerce lets you collect PayPal payments right on your WordPress site. Buyers can pay with PayPal, a credit card, and other wallets without leaving your form. It's available in Formidable Forms, including the free version, Formidable Forms Lite.
Note: If you use PayPal Commerce with Formidable Forms Lite, Expired, Basic, or Plus license, an application fee of 3% will be charged in addition to the PayPal fees. PayPal handles all of this, and no additional steps are required from the customer. To avoid paying the extra 3% charge, upgrade to Formidable Forms Business or Elite. Note that fees are only collected for US merchants, and only for one-time payments. If you have a grandfathered (lifetime) license, the 3% fee applies at every license level, including Business and Elite.
From Idea to Reality in Minutes. Build Powerful Forms, Dashboards, Apps and More.
Formidable Forms makes advanced site building simple. Launch forms, directories, dashboards, and custom WordPress apps faster than ever before.
Before you can take payments, connect your PayPal account to Formidable Forms.
PayPal needs SSL (HTTPS) on your site. If your site doesn't use SSL, a message under the Live and Test panels says "Your site is not using SSL. Before using PayPal to collect payments, you will need to install an SSL certificate on your site." Install an SSL certificate before you take payments.
Go to Formidable → Global Settings and click Payments in the settings menu on the left.
Click the PayPal logo button at the top of the page.
Under PayPal Settings, the Use the PayPal test mode box is checked by default. To take real payments, uncheck it and click Update. To test payments first, leave it checked. Learn how to set up PayPal Commerce test payments.
Find the Live panel and click the Connect button. If a Test account is already connected, scroll down the Live panel to find its Connect button.
PayPal opens in the same browser tab. Log in to your PayPal account, or click Sign Up to create one.
Once you're done, PayPal shows a "You're ready to get paid with PayPal on Formidable Forms!" message. Click Return to Formidable Forms.
Back in your settings, the Live panel now shows a green Connected badge along with your connected account and Merchant ID. To unlink the account later, click the Disconnect button.
Now that your account is connected, build a form and add the PayPal Commerce action.
Go to Formidable → Forms and click Add New. Then click Create a blank form.
The new form opens with the title "(no title)". Go to Settings → General and type a name in the Form Title box. When you finish typing, click Update to save the title. Next, click Build to go back to the fields.
From the Pricing Fields section, add a Product field, a Quantity field, and a Total field. Click the Product field. Under Product Options, leave the first row empty. It is the blank choice at the top of the Product dropdown. No product is picked when the form opens. In the next row, type your product's name over Product 1 and its price in the Price box. To add more products, click the plus icon at the end of a row. The Total field adds everything up for you.
Add a Name field and an Email field. You map them to the billing information in the PayPal Commerce action.
Add a Payment field below your other fields. This is the field buyers use to choose how they pay, so they fill out the form first and then pay. If you skip this step, Formidable adds the field when you save the PayPal Commerce action.
Click Update to save the form. Then go to form Settings → Actions & Notifications. If you leave the builder without saving, the browser asks to leave the page and the product price you set is lost.
Hover over the PayPal Commerce card and click the Add button that appears. Pick PayPal Commerce, not the separate PayPal (Legacy) action.
The Collect a Payment action opens. Give the action an Action Name for easy reference. This name is only seen on the back end.
Confirm PayPal is selected as the gateway. The choices are Stripe, Square, and PayPal. If your PayPal account isn't connected yet, the action shows "Credit Cards will not work without connecting Stripe, Square, or PayPal first." Learn how to connect PayPal Commerce.
Set the Payment Type:
One-time Payment: Collect a single payment.
Recurring: Collect payments on a repeating schedule.
(Optional) Add a Description to attach to the payment. Type it in, or click the field picker icon to pull it from a form field.
Set the Amount to charge. Type in an amount, or click the field picker icon and select a form field, usually your Total field. Picking a field inserts its ID (like [344]). Amount is required. Payments won't work without it.
Choose your Currency. If the Stripe or Authorize.net add-on is active, a Capture Payment setting also shows here. PayPal Commerce doesn't use it: it always collects a one-time payment when the entry is submitted. Leave it at When entry is submitted.
Under PayPal Settings, set the following:
Layout: Choose what buyers see on the form.
Card and checkout buttons: The card fields and the checkout buttons, such as PayPal and Venmo. This is the default and fits most forms.
Checkout buttons only: Only the checkout buttons. Buyers can't type card details on your form.
Card only: Only the card fields. The PayPal Button Settings section is hidden, because no checkout buttons show.
Pay Later: Choose how the Pay Later option shows.
Automatic: Buyers see the Pay Later option with PayPal's Pay Later message for the form total. This is the default.
Turn off messaging: Buyers still see the Pay Later option, but without PayPal's message. Use it if the message causes an error on your form.
Always Disable: Buyers don't see the Pay Later option.
Order Sync: PayPal requires that any changes a buyer makes in the PayPal window update the entry data. So if someone types one email on your form but pays with a different email, the entry's email gets overwritten. This setting controls how that's handled:
Overwrite entry data: The data from PayPal replaces what the buyer entered on the form.
Create new order data fields: Instead of overwriting, Formidable adds hidden fields for name, email, and address, then stores the PayPal data there. That way you keep a record of both what was entered on the form and what came from PayPal.
Shipping Preference: Choose where PayPal gets the shipping address when a buyer pays with the PayPal checkout buttons. Card payments don't use this setting.
Use PayPal Account Data: PayPal uses the shipping address the buyer gives in the PayPal window, such as one saved in their PayPal account. This is the default.
Use Address Field Data: PayPal uses the address from your form, and the buyer can't change it in the PayPal window. This option needs Formidable Forms Pro and an Address field mapped under Billing Information. Formidable sends the Shipping Information address, or the billing address when no shipping address is mapped. If the buyer leaves the billing address empty, then PayPal uses the PayPal account address instead.
No Shipping: PayPal doesn't show or return a shipping address. Use this when you don't ship anything, such as memberships, donations, services, and digital products.
Under PayPal Button Settings, set the button style:
Color: Choose Use Defaults, Gold, Blue, Silver, White, or Black. The PayPal button shows Silver, White, or Black. With the other choices, it keeps PayPal's standard gold color. Gold and Blue also style the Pay Later button. Blue also styles the Venmo button.
Label: Choose PayPal, PayPal Checkout, Buy Now, or Pay with PayPal.
Border Radius: Set the roundness of the button corners in pixels.
Under Billing Information, click the field picker icon in the Email box and select your Email field. Then choose your Name field's first name in the First Name dropdown and its last name in the Last Name dropdown. The Address dropdown is optional. Leave it empty when your form has no Address field.
Click Update to save your form.
Publish the form on a page, so buyers can fill it out and pay. Learn more about how to publish a form.
When you save the action, Formidable automatically adds a Payment field to your form if one isn't there already. This is the field buyers use to choose how they pay, so leave it in place. Don't delete it, or payments won't go through.
Want to bill buyers on a repeating schedule instead of once? Set the Payment Type to recurring inside your Collect a Payment action, then fill in the recurring settings below.
Go to form Settings → Actions & Notifications and open your PayPal Commerce action.
Set the Payment Type to Recurring. A Recurring Payment Settings section appears. The Layout setting is hidden. Buyers pay recurring payments only with the PayPal checkout buttons.
Set the Product Name. This is required. Type in the name of what you're selling, or click the field picker icon to pull it from a form field.
Choose the Product Type: Service, Digital, or Physical.
Set Repeat to control how often the payment repeats. Enter a number, then choose the unit, such as 1 and month(s).
Set the Recurring Payment Limit to cap the number of recurring payments. Type in a number, or click the field picker icon to pull it from a form field.
Set the Trial Period to the number of trial day(s) before billing starts. Use 0 for no trial.
Click Update to save your form.
Note: For recurring payments to work, your site must be publicly accessible. PayPal sends renewal payments, cancellations, and refunds you make in your PayPal account to your site through Formidable. A local site, or a site behind a login or firewall, doesn't get them.
— Premium Feature —
These options are available on the Basic, Plus, Business, and Elite licenses.
The paid version adds more options to the Collect a Payment action:
Map an Address in Billing Information (1), plus a full Shipping Information section (2) where you map the Email, Address, First Name, and Last Name.
Choose a third Shipping Preference option, Use Address Field Data, to send your form's address to PayPal. Learn more in the Shipping Preference step above.
This setting is available on the Basic, Plus, Business, and Elite licenses. It works the same for Stripe, Square, and PayPal.
Use the After Payment setting in the PayPal Commerce action to change a field in the entry when the status of a payment changes. For example, set a field to Paid when the payment is completed, and to Refunded when you refund it.
In the form builder, add the field that stores the status. A Virtual field works well, because buyers can't see or change it on the form. Click Update to save the form.
Go to form Settings → Actions & Notifications and open your PayPal Commerce action.
Scroll down to the After Payment section and click Add.
Fill in the new row:
Payment Status: Choose Completed, Failed, Refunded, Canceled, or Canceled and Expired. Canceled and Canceled and Expired are for subscriptions. Canceled is used when a cancellation is requested, or when the subscription reaches its Recurring Payment Limit. Canceled and Expired is used when the subscription ends or PayPal suspends it. Failed is used when PayPal reports a declined or denied payment. When PayPal reports that a subscription payment failed, Formidable counts the failure but doesn't use the Failed row. After the fourth failed subscription payment, the subscription is canceled and the Canceled and Expired row is used. When a one-time payment is declined during checkout, the form shows an error and the entry is deleted. No field is changed.
Field: Select the field to change.
Value: Type the value to save in the field. You can include field shortcodes. For example, Paid [25] saves "Paid" followed by the value of field 25. Replace 25 with the ID of your own field.
To add another row, click the + icon at the end of a row. To remove a row, click the − icon.
Click Update to save your changes.
When a payment reaches a status that has a row, Formidable saves the row's value in the field. A status with no row doesn't change the field.
A payment that PayPal reports as pending is saved with the Pending status. A Pending payment doesn't change the field. When PayPal reports the payment as completed, Formidable updates the payment to Completed and the Completed row runs.
A partial refund that you make in your PayPal account doesn't change the payment status. The Refunded row isn't used for it. The Refunded row is used when the refunds reach the full amount of the payment. The Refund link on the Formidable payment page always refunds the full amount.
When the field is a Virtual field, the same rows also show in the Payment Status section of the field's settings in the form builder. A change in one place shows in the other. Learn more about how to update a Virtual field when a payment status changes.
Here's what your buyers see when they pay through PayPal Commerce.
On your published form, the buyer fills out the fields. Then they choose how to pay in the Payment section. The payment options show when the form loads. They can include Credit Card (Visa, Mastercard, American Express, and Discover), PayPal, Google Pay, and Apple Pay. Venmo and Pay Later show only when PayPal offers them to the buyer. The methods a buyer sees depend on what's available on your PayPal account.
When they choose PayPal, a PayPal checkout popup opens. There they can pick how to pay (such as Pay in full, Pay in 4, or PayPal Credit), select a funding source, and click Pay.
After paying, the buyer returns to your site and sees a success message with the payment source, such as Card. When the buyer pays with a PayPal account, the message also shows who made the payment and their address.
With PayPal Commerce, the payment options and card fields appear right on your form, so buyers can pay without being redirected away to another site. After they confirm, they land back on your page with a success message.
Apple Pay shows on your form only after Apple has verified your domain. It also needs a page that uses HTTPS and a one-time payment.
Apple opens a file on your site from the internet to verify the domain. A local site, or a site behind a login, can't be verified.
Buyers see the Apple Pay button on Apple devices that support it.
In the PayPal Commerce action, set the Layout to Card and checkout buttons or Checkout buttons only. Apple Pay is one of the checkout buttons, so the Card only layout doesn't show it.
When you connect PayPal, Formidable registers your WordPress site's domain with PayPal for Apple Pay. This happens separately for Live and Test. Apple verifies the domain with a file on your site, so add the file before you connect:
Download the domain association file from PayPal. Use the live file for real payments, or the sandbox file while you use test mode. Only one file fits on your site. Replace the sandbox file with the live file when you start taking real payments.
Upload the file to a folder named .well-known in your site's root folder, the same folder as wp-config.php. Use your host's file manager or FTP, and create the folder if it isn't there. Folders that start with a dot can be hidden, so turn on hidden files if you don't see it. Keep the file name apple-developer-merchantid-domain-association with no file extension.
Check that the file opens at https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association without redirecting. If you get a "not found" error or a redirect, ask your host to allow the .well-known folder over HTTPS.
Register a domain yourself if your PayPal account was connected before the file was in place. Do the same if your form appears on a different domain or subdomain than your WordPress site, such as forms.example.com. Register every domain and subdomain that shows your form. Upload the file to each one.
Keep track of every payment from one place, and issue refunds when you need to.
Go to Formidable → Payments to open the Payments dashboard.
The list shows the Customer, Receipt ID, Entry, Form, Amount, Subscription, Begin Date, Expire Date, Status, Date, and Processor. Use the form dropdown and the Filter button to narrow the list. The list is wide, so it's shown here in two parts.
The second part shows the rest of the columns for the same payments.
Hover over a payment's receipt ID and click View to see its Status, User, Entry, Receipt, Amount, and Mode.
To refund a payment, click the Refund link in the Payment Details panel. When the "Are you sure you want to refund that payment?" prompt appears, click Confirm. The Refund link changes to a green Refunded message. Reload the page to see the Status change to Refunded too.
You'll also see payment info on the entry itself. Go to Formidable → Entries, open an entry, and check the Payments box for the Amount, Status, and Total Paid.
Forms that use the PayPal Standard (Legacy) add-on don't switch to PayPal Commerce on their own. Nothing is converted automatically, so each form needs a new PayPal Commerce action.
Follow these steps in order, so your forms keep taking payments until the new action is in place. Do steps 3 to 6 for a form in one sitting, so it doesn't keep both payment actions.
Open a form that takes PayPal payments and go to its Settings → Actions & Notifications.
Hover over the PayPal Commerce card and click Add. Don't pick the PayPal (Legacy) card, which adds another old action. In the new Collect a Payment action, confirm PayPal is the gateway, then set the Payment Type, Amount, Currency, and the Billing Information fields. If the Payment box shows "Oops! You need a payment field in your form.", then carry on. Formidable adds a Payment field to the form when you click Update. Don't click Update yet. You save once in step 6. For details on each setting, see Set up PayPal Commerce form to collect payments. For a subscription, see Set up a recurring PayPal Commerce payment.
Under Current Actions, find the old PayPal action. It shows the PayPal logo, and its default name is PayPal. The new PayPal Commerce action shows a green card icon.
Hover over the old action and click its trash icon. When "Delete this form action?" appears, click Confirm.
Click Update to save the new action and delete the old one. The old action is deleted only when you save.
Repeat steps 2 to 6 for every form that uses the PayPal (Legacy) action.
When no form uses a PayPal (Legacy) action anymore, go to Formidable → Add-Ons and toggle off the PayPal Legacy add-on.
When the PayPal Legacy add-on is turned off:
A form that still has a PayPal (Legacy) action no longer takes PayPal Standard payments. The form is submitted and the entry is saved, but the buyer isn't sent to PayPal.
The PayPal (Legacy) card is no longer in the list of actions. An old action that's still on a form shows "There are no options for this action."
Your entries and past payments stay. PayPal Standard payments still show in Formidable → Payments and on each entry.
Your site no longer handles PayPal's instant payment notifications, so payments PayPal reports after this aren't recorded in Formidable.
Existing PayPal Standard subscriptions aren't canceled. Turning off the add-on doesn't change anything in your PayPal account.
Keep the PayPal Legacy add-on active while existing PayPal Standard subscriptions are still billing. Their renewal payments are only recorded while the add-on is on.
If you turned off the add-on before you moved a form, then turn it back on. The old action keeps its settings, and the form takes PayPal Standard payments again.
Formidable completes a one-time PayPal Commerce payment only when PayPal reports the order as approved. If the order has any other status when the form is submitted, then the payment stops and this message shows above the form. The form shows again with the buyer's answers filled in, so they can try again.
This can happen when:
The buyer didn't finish a check PayPal asked for, such as a security check from their bank. PayPal keeps the order waiting for the buyer, so it isn't approved yet.
The same order was sent again after the payment went through, for example when the form was submitted a second time. PayPal had already completed that order, so it can't be completed again.
Before the buyer tries again, check whether their payment is already listed.
Go to Formidable → Payments, choose the form in the form dropdown, and click Filter. Look for a PayPal row with the buyer's amount and date.
If its Status is Completed, then the payment went through and the buyer doesn't need to pay again. A Pending row isn't a finished payment.
If there's no Completed row, then the buyer submits the form again and finishes every step PayPal asks for. Each new attempt creates a new PayPal order.
Apple rejects Apple Pay payments from a domain it hasn't verified. If the payment sheet closes or the payment fails, check the domain setup in Set up Apple Pay for PayPal Commerce:
The domain association file opens at https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association without redirecting.
The file matches your mode: the live file for real payments, or the sandbox file in test mode.
The exact domain or subdomain your form is on is in the list of Apple Pay domains in your PayPal account.
This hook lets you customize the query args added to the PayPal SDK script URL before it's loaded. Use it to remove specific funding sources (like Venmo) from the front end, or override values like buyer country for testing. https://formidableforms.com/knowledgebase/frm_paypal_sdk_url_query_args/
Note: PayPal Standard is the legacy integration. This integration's action is labeled PayPal (Legacy) under Settings → Actions & Notifications. To switch your forms, see Move from PayPal Standard to PayPal Commerce.
The PayPal forms plugin allows you to add PayPal to your website and collect PayPal payments using Formidable Forms. Send users and a total directly to PayPal after submitting a Formidable form. Your users do NOT need to have a PayPal account in order to pay with PayPal.
To access this add-on, ensure you have the Business license or above.
If you haven't already, install and activate the current version of Formidable Forms Premium on your WordPress site.
After confirming your Formidable Forms license, proceed to the Formidable → Add-Ons page and toggle on the PayPal Legacy add-on (the WordPress PayPal Standard legacy plugin).
Now that the PayPal form plugin is activated, go to Formidable → Global Settings → Payments and click the PayPal button. The add-on's settings are under PayPal Standard (Legacy) Settings.
Insert your PayPal email address and update any other settings. For live sites, the PayPal environment must be set to Live. Otherwise, users will be prompted to set up new PayPal accounts.
Your PayPal account must be set up to automatically send payment notifications to ensure your received payments are accurately recorded as paid. PayPal sends these notifications to your site. Your site must be publicly accessible. On a local site, or a site behind a login or firewall, payments aren't marked as paid.
Hover over your name at the top right section of the page, then select Account Settings from the dropdown menu.
Go to Account Settings → Notifications → Instant payment notifications and click the Update link.
Click the Choose IPN Settings button.
Specify the notification URL and select Receive IPN messages (Enabled). Click the Save button to save your changes. The notification URL input in the specified field will be irrelevant since Formidable PayPal will override it.
Go to the form you want to use with PayPal. Go to form Settings → Actions & Notifications. Hover over the PayPal (Legacy) card and click + Add.
Give your PayPal form action an Action Name for easy reference. This name will only be seen on the back-end.
Set the Item Name. The item name will appear on the PayPal page and the PayPal receipt. You can either type in a static product name or select a field from your form if it will change depending on your user's selection.
Insert the email associated with your PayPal account. The PayPal Email box starts with the email from your PayPal Standard (Legacy) global settings.
Set an Amount for the online payment. Click the Set Amount link if you want a specific value used in the transaction.
If you want the PayPal amount to change based on a field in the form, enable separate values in a dropdown or radio button field, then enter the amount for each option in the Saved Value column.
You can then select this field in your PayPal form action.
Set the Payment Type:
One-time Payment: Collect a one-time payment.
Donation: Collect a one-time donation.
Subscription: Use this option to set up recurring payments. Check out Set up a recurring payment for more instructions.
Select the Currency that will be used.
In the Return URL box, insert the URL you want to send the user to after processing their online payment. In the Cancel URL box, insert the URL you want to send the user to if they cancel the transaction. Both boxes start with the URLs from your Formidable Global Settings → Payments → PayPal settings. Change them to send this form's buyers to different pages. Keep a URL in each box: if you clear a box and save, no URL is sent to PayPal for it, and the global URL isn't used instead.
In the After Payment section, you may change the value of a field when the status of a payment has changed. Use this setting to save the payment status in a field. Click Update to save a new action before you add After Payment rows. Rows added before the action's first save aren't kept.
If you want to conditionally send users to PayPal after form submission, you will need to add Conditional Logic. Conditional Logic needs Formidable Forms Pro.
To save the status of a payment in a field in your form:
Go into editing a form that has a PayPal action included.
Add a dropdown field. Set the field label as Payment status and add the options Pending and Completed. Select Pending as the default value.
To hide the field from the user, open the Advanced section in the field options. Set Visibility to Administrator. Then click Update.
For extra security and to prevent malicious users from changing the values of the payment status field, use the frm_validate_field_entry filter to set the value to pending only for a new entry.
Go to your form Settings → Actions & Notifications. Under Current Actions, click your PayPal (Legacy) action to open it. Don't add a new one. If you just added the action, click Update first, so the After Payment row you add next is saved.
Scroll down to the After Payment section. Click the Add button.
In the Payment Status column, select Completed. In the Field column, select your Payment status field. In the Value column, type Completed, spelled exactly like the option in your Payment status field.
Click Update. Now when a form payment is successfully completed, the payment status field will switch to Completed to reflect the status of the PayPal payment. If the payment status is not updating properly, please review the IPN troubleshooting steps.
In the Repeat Every section, select how often the payment will recur.
You may include a trial period before the actual subscription begins. If you want to include a trial period, select Start this subscription with a trial. Input how much the Trial amount will be, then select how long the Trial Length will be.
If you want to retry a failed recurring payment, select Retry a failed payment for a subscription. A failed PayPal payment is considered to be a subsequent payment in a recurring profile that doesn't go through. This does not include failing to complete the first payment once sent to PayPal.
Click Update. Now when a user submits the form, they will be taken to PayPal to make the first payment of the recurring series. PayPal will automatically bill the user at intervals determined by your Repeat Every setting.
If you want to set up a WordPress form that allows a user to select a recurring payment or a non-recurring payment, follow the instructions below.
Create a new form or edit an existing form that takes payments. Add a Radio Button or Dropdown field. Add options for the user to select a recurring or non-recurring payment.
Click Update.
Go to the form Settings → Actions & Notifications. Hover over the PayPal (Legacy) card and click + Add to add a PayPal form action.
In the Action Name field, insert Non-Recurring Payments.
In the Item Name box, click the field picker icon and select the radio button field. This inserts the field ID in brackets, like [25]. The value submitted in the form then appears on the PayPal page.
In the Amount section, select Set Amount. In the box, type in the amount of the non-recurring payment.
In the Payment Type, select One-time Payment.
Scroll down and turn on Add Conditional Logic (1). Leave Do and Any selected. Set the condition to your radio button field equals the non-recurring option (2). Long option names are shortened in the dropdown.
Go to the form Settings → Actions & Notifications, hover over the PayPal (Legacy) card and click + Add to add another PayPal (Legacy) form action.
In the Action Name field, insert Recurring Payments.
In the Item Name box, click the field picker icon and select the radio button field. This inserts the field ID in brackets, like [25]. The value submitted in the form then appears on the PayPal page.
In the Amount section, select Set Amount. In the box, type in the amount of the recurring payment.
In the Payment Type, select Subscription. In the Repeat Every section, select how often the recurring payment will occur.
Scroll down and turn on Add Conditional Logic (1). Leave Do and Any selected. Set the condition to your radio button field equals the recurring option (2).
Click Update. Now when the user submits a form, they will be charged depending on their selection of either the recurring or non-recurring option.
If you want to set up a form that allows a user to select between two different currencies (e.g. US Dollars (USD) and Canadian Dollars (CAD)), follow the instructions below.
Add a Radio button or Dropdown field in your form with options for users to select their preferred currency payment.
Add a PayPal form action and set its Currency to U.S. Dollar (USD). Then turn on Add Conditional Logic (1) and set the condition to Currency equals US Dollars (USD) (2).
Add another PayPal form action and set its Currency to Canadian Dollar (CAD). Then turn on Add Conditional Logic (1) and set the condition to Currency equals Canadian Dollars (CAD) (2).
(Optional) For the other PayPal form action using Canadian Dollars (CAD) currency, you can change the Return URL and Cancel URL to that of your separate PayPal Canadian account. These are the URLs used for PayPal to send users after purchase or if they cancel the transaction.
If you want to accept recurring and non-recurring payments for both currencies, follow the steps below instead.
Add a Radio button or Dropdown field in your form with options for users to select their preferred currency payment.
In the Recurring Payments form action with US Dollars (USD) currency, turn on Add Conditional Logic (1) and select All (2). Then set two conditions. Click Add Condition (3) to add the second row. The second condition uses your recurring or non-recurring field, here called Membership. Long option names are shortened in the dropdown.
Currency equals US Dollars (USD)
Membership equals Monthly Membership (Recurring)
In the Non-Recurring Payments form action with US Dollars (USD) currency, turn on Add Conditional Logic (1) and select All (2). Then set two conditions. Click Add Condition (3) to add the second row. Long option names are shortened in the dropdown.
If you have a new website and want to test accepting payments through PayPal, you can set up a sandbox account to do the testing without using your personal PayPal account.
On the PayPal Sandbox Accounts page, you will see that your first Business and Personal Sandbox account was created when you signed up for a developer account on the developer site. Copy the Business Sandbox email, as this is the email address you will use in your Formidable PayPal settings.
Go back to your WordPress site. In the Formidable → Global Settings → Payments → PayPal, select Testing as the PayPal environment and set the PayPal email to the email address from your Business Sandbox test account. Click the Update button to save your changes.
Go to the form you want to use with PayPal, then go to form Settings → Actions & Notifications. Hover over the PayPal (Legacy) card and click + Add.
Insert the Business Sandbox email into the PayPal email field of the form action.
Run a test transaction and pay using your Personal Sandbox email, which you can find in your PayPal Sandbox account.
The Hold email notifications until payment is received option doesn't trigger when PayPal is in test mode.
Trigger an action after a PayPal payment is completed. Send a payment notification email, subscribe a user to Mailchimp, send a text, or register a user only after a successful PayPal payment. Any actions you want to trigger after a completed payment must be included in the same form.
Go to your form Settings → Actions & Notifications and open the action that you want to trigger after a PayPal payment is completed.
In the Trigger this action when dropdown, select Successful PayPal payment. Several triggers can be checked at once.
Uncheck Entry is created, so the action only runs after the payment is complete. It's checked by default.
Click Update. Now when the user submits a payment in PayPal, and your site is notified by PayPal of the payment completion, the action will be triggered. The action will not be triggered until the PayPal notification is received. If the actions are not triggering after a complete payment, please review the IPN troubleshooting steps.
Add a post status field to your form, if you don't have one already. In the Create Post action, set Post Status to Create New Dropdown Field. This adds a Status field to your form.
Select Draft as the default value in your new Status field. Click the field, then click the circle beside Draft under Dropdown Options.
If you do not want the user to have access to changing the status of this field you can set the field to Read Only. You can also hide the whole field from the user by changing the Visibility to Administrator.
Click Update.
Go into the form's PayPal action. In the After Payment section, click Add. If the section already has a row, click the + icon at the end of that row to add another. Then fill in the new row:
Set the dropdown in the Payment Status column to Completed.
Set the dropdown in the Field column to your Status field.
Type publish in the Value column.
Click Update and Publish your form on a page. Now when a user creates a post and submits the form, they will be taken to PayPal so they can submit a payment. The post will not be published until the PayPal payment notification is received.
Hover over your name at the top right of the page and select Account Settings.
Click Seller tools in the left menu. Some accounts call it My selling tools.
On the Seller tools page, select Website preferences.
You will then be redirected to the Website payment preferences page. Scroll down to PayPal account optional. This option must be turned on.
Now, when the user checks out, they can either sign in to their account or check out as a guest. If the user chooses to check out as a guest, they can sign up for a PayPal account after checkout.
Visit the PayPal page for more instruction on enabling guest checkout.
Check if you have a firewall plugin that may prevent PayPal from reaching your site. If you're not sure, visit yoursite.com/wp-admin/admin-ajax.php?action=frm_payments_paypal_ipn while logged out. If you see a blank page, that's good. If you are running a firewall plugin that may be blocking the IPN data, please disable that plugin and submit a new payment.
If you are implementing any Access Control List (ACL) or filters on IP addresses for the IPNs received from PayPal, you need to add or whitelist the following PayPal IP Addresses. Doing so will help avoid missing IPNs from PayPal.
If your PayPal environment is set to 'Testing', try switching to 'Live'. You can switch from Testing to Live in your Formidable → Global Settings → Payments → PayPal.
Check to see if you have any custom code on your site that might interfere. If you have custom code that uses the frm_payment_paypal_ipn hook or that modifies any entry values in the PayPal form, please remove the code and submit a new payment.
Turn on the debug log. Go into Formidable → Global Settings → Payments → PayPal and check the 'Log results from IPN notifications' option. Click Update. Then submit a new payment and open the debug log. Create a new ticket in our help desk and paste the log data in the ticket.
If you see 'IPN Response from PayPal Server: INVALID' in your debug log, please log into your PayPal account and review your IPN history page. Check if there are any notifications logged there and check their status. Report your findings in a help desk ticket.
If you see pending_reason=unilateral in your debug log, check if you have verified your email address. The payment is pending because it was made to an email address that is not yet confirmed or registered. Report your findings in a help desk ticket.
While it is possible to trigger an email on successful payments, PayPal only sends out a Payment Failure notice on recurring payments. It gets fired when a subscription payment attempts to charge and fails. It doesn’t fire, however, on initial or one-time payments that aren’t completed or even new payments that fail.
As a workaround, use the Form Action Automation add-on to send a reminder 30 mins after purchase. Then add conditional logic to the email notification based on your Paid status. If the payment status field is not updated to Paid, then the email sends out.
If you're seeing an error message Things don’t appear to be working at the moment in your PayPal checkout page, you may need to unblock the non-encrypted websites to make payments. To resolve this, follow the instructions below.
Hover over your name at the top right of the page and select Account Settings.
Click Seller tools in the left menu. Some accounts call it My selling tools.
On the Seller tools page, select Website preferences.
You will then be redirected to the Website payment preferences page. Scroll down to Encrypted website payments and select Off next to Block Non-encrypted Website Payment.
If you need to take a payment in a currency that is not included in the PayPal action's currency options, you may add a currency using the frm_currencies hook.
When a visitor fills in details on your site, save them time by passing this information along to PayPal. This prefills the field values over at PayPal. A full list of allowed values is kept in the PayPal docs.
add_filter( 'formidable_paypal_url', 'frm_send_user_info_to_paypal', 10, 3 );
function frm_send_user_info_to_paypal( $paypal_url, $entry_id, $form_id ) {
if ( $form_id == 5 ) { //change 5 to the ID of your form
$entry = FrmEntry::getOne( $entry_id, true );
$paypal_url .= '&first_name=' . urlencode( $entry->metas[25] ); // change 25 to your first name field ID
$paypal_url .= '&last_name=' . urlencode( $entry->metas[26] ); // change 26 to your last name field ID
$paypal_url .= '&email=' . urlencode( $entry->metas[27] ); // change 27 to your email field ID
$address_field_id = 28; // change 28 to your address field ID
$address_meta = $entry->metas[$address_field_id];
$paypal_url .= '&address1=' . urlencode( $address_meta['line1'] );
$paypal_url .= '&address2=' . urlencode( $address_meta['line2'] );
$paypal_url .= '&city=' . urlencode( $address_meta['city'] );
$paypal_url .= '&zip=' . urlencode( $address_meta['zip'] );
$paypal_url .= '&state=' . urlencode( $address_meta['state'] );
$paypal_url .= '&country=' . urlencode( $address_meta['country'] );
}
return $paypal_url;
}
Use the code below to stop a recurring payment after a set number of payments. Replace 5 with your form ID. Replace 4 with the number of recurring payments that you want to take.
add_filter( 'formidable_paypal_url', 'set_recurring_payment_limit', 10, 3 );
function set_recurring_payment_limit( $paypal_url, $entry_id, $form_id ) {
if ( $form_id == 5 ) { //change 5 to the ID of your form
$paypal_url .= '&srt=4';
}
return $paypal_url;
}
Use the following example to change a user's role after they make a PayPal payment. Change 'contributor' to the role you want to set after a payment is completed. Change 123 to your form ID.
add_action('frm_payment_paypal_ipn', 'change_paid_user_role');
function change_paid_user_role($args){
if ( $args['entry']->form_id != 123 ) {
return;
}
$new_role = 'contributor'; //change this to the role paid users should have
if(!$args['pay_vars']['completed']) {
return; //don't continue if the payment was not completed
}
if(!$args['entry']->user_id or !is_numeric($args['entry']->user_id)) {
return; //don't continue if not linked to a user
}
$user = get_userdata($args['entry']->user_id);
if(!$user) {
return; //don't continue if user doesn't exist
}
$updated_user = (array) $user;
// Get the highest/primary role for this user
$user_roles = $user->roles;
$user_role = array_shift($user_roles);
if ( $user_role == 'administrator' ) {
return; //make sure we don't downgrade any admins
}
$updated_user['role'] = $new_role;
wp_update_user($updated_user);
}
If you want to save the transaction ID in a field after the payment is complete, you may use the code below. You can add it to a child theme's functions.php file or the Code Snippets plugin. Replace 10 with the ID of your form and replace 123 with the ID of the field that will store the transaction ID. The field must be blank by default. Otherwise, this code adds extra data to your database when it is triggered.
The $vars includes three keys:
pay_vars: an array that includes the data from the frm_payments table, so it has id, meta_value, receipt_id, invoice_id, sub_id, item_id, action_id, amount, status, begin_date, expire_date, paysys, created_at, completed.
payment: the raw object version of pay_vars.
entry: the entry object that was just created.
add_action('frm_payment_paypal_ipn', 'save_frmpaypal_transaction_id');
function save_frmpaypal_transaction_id( $vars ){
if ( ! $vars['pay_vars']['completed'] ) {
return; //don't change value if the payment was not completed
}
if ( $vars['entry']->form_id == 10 ) {
$field_id = 123;
$transaction_id = $vars['pay_vars']['receipt_id'];
if ( $transaction_id ) {
FrmEntryMeta::add_entry_meta( $vars['entry']->id, $field_id, null, $transaction_id );
}
}
}
If the one-time payment fails the first time, you can generate a link to allow users to pay again without filling out the form a second time. This shortcode can be used in a number of different ways. The most likely use is in a view where you can add filters like "User ID equals current user", and the shortcode is [pay_again id=[id]]. You can also set a specific entry id here if you want [pay_again id=60].
Note: Use this link for one-time payments. The shortcode uses the PayPal (Legacy) action listed first under Current Actions in the form's settings. Actions are listed by Action Name, A to Z. The link uses that action's amount, item name, Return URL and Cancel URL, but the PayPal email and currency from your global PayPal settings. On a form with one action per currency, every link uses the global currency.
The link in this snippet always goes to live PayPal (www.paypal.com). To test it with a sandbox account, change the address in the $paypal_url line to https://www.sandbox.paypal.com/cgi-bin/webscr/.
Since version 3.0, the PayPal (Legacy) action has its own Return URL box, so most sites don't need this snippet. The snippet adds a second return address after the one from the action's Return URL box.
add_filter('formidable_paypal_url', 'formidable_paypal_url', 10, 3);
function formidable_paypal_url($paypal_url, $entry_id, $form_id){
if($form_id == 5) //change 5 to the ID of your form
$paypal_url .= '&return='. urlencode('http://example.com');
return $paypal_url;
}
You must log in to vote
Was this article helpful? *
This article may contain affiliate links. Once in a while, we earn commissions from those links. But we only recommend products we like, with or without commissions.
In this article
Get More Done In Less Time With Better
WordPress Forms
Upgrade your
workflow with advanced WordPress forms and integrated Views.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
This website uses cookies
Websites store cookies to enhance functionality and personalise your experience. You can manage your preferences, but blocking some cookies may impact site performance and services.
Essential cookies enable basic functions and are necessary for the proper function of the website.
Name
Description
Duration
Geolocation Config
This cookie is used to store the consent settings based on the visitor's location.
90 days
Cookie Preferences
This cookie is used to store the user's cookie consent preferences.
90 days
These cookies are needed for adding comments on this website.
Name
Description
Duration
comment_author
Used to track the user across multiple sessions.
Session
comment_author_email
Used to track the user across multiple sessions.
Session
comment_author_url
Used to track the user across multiple sessions.
Session
Easy Digital Downloads is a complete eCommerce solution for WordPress.
Name
Description
Duration
edd_items_in_cart
Stores information about the cart.
Session
edd_session_
Stores information about the current user session.
Session
Formidable Forms is used to manage forms on this website.
Name
Description
Duration
frm_form_
Saves the ID of the form and the time the entry was submitted.
2 hours
These cookies are used for managing login functionality on this website.
Name
Description
Duration
wordpress_logged_in
Used to store logged-in users.
Persistent
wordpress_sec
Used to track the user across multiple sessions.
15 days
wordpress_test_cookie
Used to determine if cookies are enabled.
Session
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a web analytics service offered by Google that tracks and reports website traffic.
Used to determine if the user is in a new session/visit.
Session
__utmt
Used to throttle request rate.
10 minutes
__utmv
Used to store visitor-level custom variable data.
2 years
__utmz
Stores the traffic source or campaign that explains how the user reached your site.
6 months
LinkedIn is a professional networking platform for job seekers, employers, and industry connections.
Name
Description
Duration
fcookie
Used for bot detection.
7 days
AnalyticsSyncHistory
Used to store information about the time a sync with the lms_analytics cookie took place for users in the Designated Countries
30 days
ccookie
To remember if a user received a captcha challenge.
20 minutes
lissc
Pending
1 year
ABSELB
This is Load Balancer Cookie for affiliate marketing
2 years
spectroscopyId
These cookies are set by LinkedIn for advertising purposes, including: tracking visitors so that more relevant ads can be presented, allowing users to use the 'Apply with LinkedIn' or the 'Sign-in with LinkedIn' functions, collecting information about how visitors use the site, etc.
session
brwsr
This cookie is used to Affiliate Marketing Cookie for LinkedIn
2 years
UserMatchHistory
These cookies are set by LinkedIn for advertising purposes, including: tracking visitors so that more relevant ads can be presented, allowing users to use the 'Apply with LinkedIn' or the 'Sign-in with LinkedIn' functions, collecting information about how visitors use the site, etc.
session
lihc_auth_
Used by LinkedIn HelpCenter Live Chat to store language and chat start timestamp. Example names of this cookie include lihc_auth_en, lihc_auth_es, depending on language preference.
Session
lang
Used to remember a user's language setting
session
li_a
Used to authenticate enterprise users on Sales Navigator and Recruiter
30 days
li_gc
Used to store guest consent to the use of cookies for non-essential purposes
2 years
li_ep_auth_context
User to authenticate LinkedIn enterprise customers
30 days
li_rm
Used as part of the LinkedIn Remember Me feature and is set when a user clicks Remember Me on the device to make it easier for him or her to sign in to that device
1 year
bscookie
Used by LinkedIn to track the use of embedded services.
1 year
lms_ads
This cookie is used to identify LinkedIn Members off LinkedIn for advertising
30 days
trkCode
This cookie is used by LinkedIn to support the functionality of adding a panel invite labeled 'Follow Us'
1 year
_guid
This cookie is used to identify a LinkedIn Member for advertising through Google Ads
90 days
trkInfo
This cookie is used by LinkedIn to support the functionality of adding a panel invite labeled 'Follow Us'
1 year
BizographicsOptOut
This cookie is used to determine opt-out status for non-members
10 years
li_oatml
Collects information about how visitors use our site.
30 days
IRLD
This cookie is used for Affiliate Marketing Cookie for LinkedIn
2 years
liap
Cookie used for Sign-in with Linkedin and/or to allow for the Linkedin follow feature.
90 days
l_page
This cookie is used for measuring conversion metrics on LinkedIn
6 months
pushPermInfo
Used across multiple LinkedIn services to determine cool off for push notification prompts
365 days
pushPermState
Used across multiple LinkedIn services to determine the user's push notification permission preference
30 days
ln_or
Used to determine if Oribi analytics can be carried out on a specific domain
1 day
chp_token
Used to denote whether the user has gone through two factor authentication or solved a Captcha.
Session
li_sugr
Used to make a probabilistic match of a user's identity outside the Designated Countries
90 days
lidc
Used by the social networking service, LinkedIn, for tracking the use of embedded services.
1 day
sdsc
This cookie is used for signed data service context cookie used for database routing to ensure consistency across all databases when a change is made. Used to ensure that user-inputted content is immediately available to the submitting user upon submission
Session
bcookie
Used by LinkedIn to track the use of embedded services.
1 year
li_mc
This cookie is used as a temporary cache to avoid database lookups for a member's consent for use of non-essential cookies and used for having consent information on the client side to enforce consent on the client side
6 months
PLAY_FLASH
Used by some LinkedIn services to facilitate the display of messages on page transitions . Users include notifying a user when a form is successfully submitted or fails , and to provide other similar notifications.
Session
li_referer
Used to detect bots. Cookie remembers the referring website before redirecting the user to captcha for authorization
15 minutes
f_token
Used to detect bots for anti-scraping
3 minutes
li_apfcdc
Used for triggering the abuse prevention features on member device.
10 hours
li_odapfcc
Used to control the number of abuse prevention features collected from member device.
2 Years
ac_L
Counts the number of times the account center banner, which is displayed to inform users with an incomplete profile how to complete their profile, was closed by a user to determine display logic
180 days
ac_LD
Contains the date when the account center was displayed to a user to determine display logic
180 days
recent_history_status
Used to determine whether a user enabled or disabled the Guest Recent History Setting
10 years
all_u_b
To know if a user has opted in to viewing LinkedIn on an unsupported browser
21 days
uh
Used to set the user preference for the mobile web platform via a user's settings
Session
abiRedirect
Enables import of address book during onboarding flow for users who choose to import their address book
Session
wwepo
Used to ensure that useres who choose to sign up using phone only have that setting and preference respected
90 days
li_cu
Used to map a user to a captcha challenge page
15 minutes
li_ec
Used to store unbound enterprise users' cookie consent
6 months
denial-client-ip
Stores user IP address for anti-scraping and DOS prevention
5 seconds
li_gpc
Used to remember a user's preferences on LinkedIn's Global Privacy Control
1 hour
denial-reason-code
Used for anti-scraping and DOS prevention
5 seconds
li_gp
Stores privacy preferences for guests to LinkedIn
1 year
rtc
Used as part of anti-abuse processes on LinkedIn
120 seconds
redirectFromM2MInviteSent
Used to notify and provide the appropriate profile display logic when the user sends an invitation to connect on LinkedIn from a LinkedIn member via email.
Session
queryString
This cookie is used to persist marketing tracking parameters
15 days
cookie.policy.banner.eu
Used to display cookie banner in LinkedIn Lite
365 days
cookie.policy.banner.nl
Used to display cookie banner in LinkedIn Lite on the Netherlands site.
365 days
appName
Used to identify the source as the LinkedIn Lite app to send the right service worker to the app
Session
appLang
Used to set the right language on the LinkedIn Lite app
Session
lls-integration
Validates whitelisted partners for content integrations
30 days
feed-sort
Used to remember a member's preference how the feed should be sorted
1 day
integration_type
Used to determine which integration traffic is coming from to render the profile namecard experience
30 days
li_theme_set
Remembers which users have updated their display / theme preferences
6 months
PLAY_LANG
Used by some LinkedIn services to remember a user's language preference
Session
lms_analytics
Used to identify LinkedIn Members off LinkedIn for analytics
30 days
PLAY_SESSION
Used by some LinkedIn services to store session information
Session
li_fat_id
Member indirect identifier for Members for conversion tracking, retargeting, analytics
30 days
redirectFromM2MInviteAccept
Determines the appropriate profile display logic when a user accepts an invitation to connect on LinkedIn from a LinkedIn member via email.
Session
li_giant
Indirect indentifier for groups of LinkedIn Members used for conversion tracking
7 days
sharebox-suggestion
Displays a banner that provides help text to first time users of the Elevate share box
Session
li_cc
Used to ensure a user's phone number is inputted in China
1 week
lss_bundle_viewer
Stores consent when a user agrees to view a Smartlinks link
1 month
interstitial_page_reg_oauth_url
Stores the referring page to ensure the Authentication screen displays correctly
1 day
df_ts
Device fingerprinting sampling for performance optimization
1 day
lil-lang
Stores user's selected language setting for LinkedIn Learning
Session
li_alerts
Used to track impressions of LinkedIn alerts, such as the Cookie Banner and to implement cool off periods for display of alerts
1 year
li_theme
Remembers a user's display preference/theme setting
6 months
li_feed_xray
Used to show new items in developer option 'Feed X-ray'
Session
VID
ID associated with a visitor to a LinkedIn microsite which is used to determine conversions for lead gen purposes
1 year
recent_history
Used to remember URLs visited by the guest to show the pages back where they left off
90 days
Marketing cookies are used to follow visitors to websites. The intention is to show ads that are relevant and engaging to the individual user.
Name
Description
Duration
affwp_campaign
Stores the affiliate campaign name for tracking purposes.
30 days
affwp_ref
Stores the referring affiliate ID for commission attribution.
30 days
affwp_ref_visit_id
Stores the visit ID linked to the referring affiliate.
30 days
LinkedIn Insight is a web analytics service that tracks and reports website traffic.