PayPal Standard takes customers from your site to PayPal’s secure site to finish paying for their order.
What do you need to do? Ensure that your host supports HTTPS connections through CURL/fsockopen using TLS 1.2 or newer certificates. Your system status page in WooCommerce tells you if there are issues connecting. Contact your host to fix, if needed.
Requirements ↑ Back to top
- A PayPal Business account
Go to paypal.com and sign up for a PayPal Business account or convert an existing Personal account to Business. It’s free.
Setup and Configuration ↑ Back to top
To set up PayPal Standard:
1. Go to: WooCommerce > Settings > Checkout > PayPal.
2. Tick the Enable PayPal Standard if you’re ready to go live.
3. Enter a Title and Description shown to customers in checkout.
4. Enter your email address in the PayPal Email field, which is the most important thing to configure before taking payments. Must match the same email address on your PayPal Business account.
5. Tick the Enable PayPal Sandbox checkbox if you wish to test the checkout process during your store’s development. With sandbox enabled, no payment/money is taken. To use Sandbox mode, you need a separate sandbox account via PayPal Sandbox.
6. Debug logs may also be turned on, which can be useful during development. You may need to first create a wc-logs folder and set permissions to make it writable. These logs are available at WooCommerce > System Status > Logs and then select the PayPal log from the dropdown.
Advanced Options ↑ Back to top
Under Advanced Options, complete fields as needed.
There are two shipping options:
- Send shipping details to PayPal. You can opt to have WooCommerce send shipping details to PayPal to create shipping labels instead of billing.
- Address override option. PayPal verifies addresses therefore this setting can cause errors. We recommend keeping it disabled, but it can be useful in preventing address information from being changed.
These fields can also be useful:
- Receiver Email can be used if the email address that receives payments is different from the primary email address on your PayPal account.
- Invoice Prefix to add a prefix to PayPal invoices. This is helpful if you’re using the same PayPal account for more than one website/store.
- Payment Action lets you choose to capture funds immediately or only authorize.
- Page Style is an optional setting where you can enter the name of a custom page from your PayPal account.
- PayPal Identity Token can be used to verify payments if you have IPN issues.
API Credentials ↑ Back to top
There are three fields to paste the API information into:
- API Username
- API Password
- API Signature.
Learn how to get the API information from PayPal here.
Configuring the PayPal dashboard ↑ Back to top
Most of the configuration is handled from WooCommerce, but there are a few items to set up at PayPal.
PayPal IPN URL ↑ Back to top
It’s good practice to set up your PayPal IPN URL.
PayPal Instant Payment Notifications (PayPal IPN) tells your store that payment has been successful (or not). To learn more about how to set this up on PayPal, see: How to Activate IPN in your PayPal Account. There can be only one IPN URL set for a PayPal account, so you need to use an account that is not already using an IPN for any other purpose.
In your PayPal Business account, go to: Profile > Profile and settings > My selling tools. Click on Instant payment notifications to set your URL.
Use the following, replacing example.com with your own URL:
Auto-Return ↑ Back to top
You can set up auto-return in your PayPal account, which will take customers to a receipt page. For example, use the following URL and replace example.com with your own URL:
Regardless of this setting, it redirects dynamically to the correct receipt page.
FAQ ↑ Back to top
Do I need an SSL certificate? ↑ Back to top
The payment is made offsite on the PayPal website and not your checkout. Adding an SSL certificate is optional but definitely encouraged. SSL is becoming a ranking factor for search results; it also keeps any information transmitted to and from your site secure.
I have pending orders, but no payment was received. ↑ Back to top
If the customer abandons the order in PayPal (and not your WooCommerce store), the order shows as Pending (unpaid). No action is necessary.
When the hold stock time is reached, the order will be automatically canceled.
What data is sent to PayPal when a customer is checking out? ↑ Back to top
The PayPal gateway passes individual line items to PayPal (product name, price and quantity) unless:
- Your prices are defined as including tax
- You have more than nine line items, including shipping – PayPal only supports nine items.
This is to prevent rounding errors and to ensure correct totals are charged. When line items are not sent, the items are grouped and named ‘Order #x’.
My shipping costs are not transferring to PayPal ↑ Back to top
WooCommerce 2.6+ sends shipping costs as a ‘real’ shipping line item via PayPals API. If your PayPal account has shipping rules setup within it, these will take over and remove the cost WooCommerce sends across.
To resolve you must remove all shipping rules setup on the PayPal account side or disable them using this method:
Why am I getting payments, but orders are still pending? *OR* Why is my cart not clearing after making payment? ↑ Back to top
In this case, the PayPal IPN is failing. Check your server and see the Debugging IPN issues section below.
Why do I get an Internal Server Error? ↑ Back to top
If you see the following error message after hitting the purchase button, the email address you entered in PayPal settings is incorrect:
Using the same PayPal account with more than one website ↑ Back to top
WooCommerce uses an “invoice” system. There is a setting that “blocks duplicate invoices.” With two websites using invoices, it is inevitable that there will be duplicate invoice numbers. By de-selecting that setting in PayPal, the invoices have no issue. Please check that the Invoice Prefix in your WooCommerce PayPal settings is different for each site.
Do customers need a PayPal account?
PayPal has an option that allows customers to check out without creating an account. The setting is called PayPal Account Optional, and can be found inside of your PayPal account in the My Profile section. Go to My selling tools > Website Preferences, and turn on PayPal Account Optional. To learn more, see: PayPal’s Website.
Is PayPal Seller Protection in effect? ↑ Back to top
Yes, if you use the Shipping address. No, if you use your Billing address (default). The PayPal API does not recognize more than one address.
Message: Seller only accepts payments from unencrypted payments ↑ Back to top
The “Seller only accepts payments from unencrypted payments” message is from PayPal.
This error displays when your PayPal Account Profile is set to only accept payments from “encrypted” buttons but your item button code is “not” encrypted. This interrupts the payment process and displays the error message.
To turn off this option:
- Log into your PayPay Account.
- Select the Profile tab or Edit Profile link.
- Under Selling Preferences, select Website Payment Preferences.
- In the “Encrypted Website Payments” section, select Off.
- Save changes.
Message: This invoice has already been paid ↑ Back to top
WooCommerce order numbers may not be unique if you’re running multiple stores or use your PayPal account for other things.
To avoid this issue, go to WooCommerce > Settings > Checkout > PayPal and set a unique ‘prefix’ for your store, e.g., MYSTORE-
Debugging IPN issues ↑ Back to top
The below steps can be taken if IPN is not updating your orders. Whilst working on these problems you may want to prevent pending (unpaid) orders cancelling automatically so you have a chance to manually confirm payment without IPN. To do this, go to WooCommerce > Settings > Products > Inventory and set the “Hold Stock (minutes)” option to nothing (leave the field empty).
Please also note, you can check the IPN history page for more information on IPN deliverability here: https://www.paypal.com/us/cgi-bin/webscr?cmd=_display-ipns-history
Are you testing locally? ↑ Back to top
If you are testing locally, on MAMP for example, PayPal is unable to talk to your store. This is normal — it will work when you host it on the web.
Check your server has support for fsockopen ↑ Back to top
The gateway must talk to PayPal to check the validity of notifications – for this it needs fsockopen support. The exact function used is http://codex.wordpress.org/Function_API/wp_remote_post
*To check if this is supported by your server, go to WooCommerce > System Status and see the results.
Check if your server has a firewall ↑ Back to top
The gateway talks to PayPal via a https URL. Your firewall needs to have the outgoing port 443 open.
Enable Logging ↑ Back to top
After enabling logs via the settings, check to see that responses are being received. If they are not, then the problem may be due to your WordPress install or a plugin conflict. Turn off other plugins.
Check Email Addresses ↑ Back to top
Check that the Email Address in the PayPal gateway settings matches the email address passed back by IPN. Use your primary email address for your PayPal account. They need to match.
Failure to do so will cause the IPN response to be rejected. This could result in orders remaining on hold or not completing.
Check for conflicts ↑ Back to top
If the order status is not changing on order complete, check if there is a conflict with W3 Total Cache.
Currency in PayPal Sandbox mode ↑ Back to top
When PayPal is in sandbox mode, it automatically sets payments to Pending if they are made in a currency other than the sandbox currency. Ensure that the currency you have set in PayPal sandbox is the same as the currency in your WooCommerce store.
Why don’t customers see the link to download products after paying and getting redirected back to my website? ↑ Back to top
This could be a sign that the IPN isn’t working correctly with your website. A possible workaround is to enable Payment Data Transfer (PDT). Within your PayPal account settings, try setting the following:
Once you have saved the settings, go back to the Website Settings page and find the PDT Identity Token:
With the PDT Identity Token copied, you can paste it into the WooCommerce > Settings > Checkout > PayPal field:
Still not working? ↑ Back to top
Get in touch with your host. Some hosts, such as GoDaddy, are known to have problems with IPN, and this is unfortunately out of our control.
Alternatively, to disable duplicate invoice checking, log into your PayPal account and go to Profile > Profile and Settings > My Selling Preferences > Block Payments (or) Payment Receiving Preferences and set Block accidental payments to “No.”