WordPress tutorials

How to Add PayPal Payment Button On a WordPress Page

PayPal is a payment service that is trusted by many. It is not uncommon to visit a website and see an option to donate to a cause or purchase an item. Whether you’re a charity seeking monetary assistance to further the greater good or you have a product or service to offer consumers, this option is a good way to take that next step.

<h2>How to Get the PayPal Payment Button Code</h2>

Before you can add a PayPal payment button to your page, you need to login and obtain a code from your PayPal Account:


Once logged in, scroll to the Selling Tools option on the left most side of the page:

paypal-button-seller tools

Once you have selected that option, you should see Create payment buttons for your website:

create payment paypal button

Click on Create a button under Option 1, then you will have the option to make some additional changes. You can choose a button type from the drop down list: Donations or Buy Now. Depending on the type of button you select, the remaining fields may vary. Avoid the box next to the customization options such as the DROP-DOWN MENUS or TEXT FIELDS. If any of these are selected, your button wont be able to function on WordPress:

paypal payment button

Feeling a bit creative? Then go ahead and customize the PayPal payment button by adding your own image:

cust paypal button - own image

Bear in mind that only Premium and Business PayPal accounts have an actual Merchant ID. Choose Use my primary email address:

merchant id-paypal payment button

Once you click Create Button you will get a box with two tabs, Website and Email:

code paypal-paypal payment button

Do not use the code under the Website  tab because WordPress will not allow you to post web forms. Therefore the code will be stripped.users post web forms so the website code would be stripped. The link under the Email tab is what you will attach to your button image. That is the URL that you will need to copy.

<h2>Adding the PayPal Payment Button to Your Page</h2>

Paste your code in the section that says YOUR LINK HERE:

<a href="YOUR-LINK-HERE"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="Buy Now Button" /></a>

Feel free to choose another design or create your own for the button style. Then once you have done that, paste the code in the HTML section of your page or post:

paypal paste code-paypal payment button

To display your PayPal button in a sidebar or other widget area, you will need a text Widget in your Customizer. Then paste your button code into it:

paypal button-next step-paypal payment button

Now the journey has ended and the final step involves you saving the changes. Once you have done so, test your PayPal payment button to ensure it works properly. You don’t want your visitors to feel frustrated because the link doesn’t work properly. Enjoy this hassle free means of obtaining sales or acquiring donations. If at any point you get bored with the current design, remember you can choose from different PayPal payment button layouts. These are all available on the PayPal site. Feel free to get creative also and design your own PayPal payment button.